Diversity Ceilidh - Technical Information
This is rather technical information that most dancers and callers don't need to understand. It is intended for software engineers and the like wanting to use our data.
Finding the dance pages
As well as the human-friendly
database page, we have a sitemap file at
https://eceilidh.org.uk/dance-files-sitemap.xml
About the "ld+json" in dance pages
Introduction
Each page describing an individual dance includes data that isn't shown to the casual user. It's machine readable information about the dance. It looks something like this:
<script type="application/ld+json">
{"@context":"http://schema.org","@type":"HowTo","name":"Country Bumpkin....
</script>
The "diversity-dance-database/ld+json" section
This is mainly used by our site internally to share dances between pages and systems. It contains all the details of each dance. It is moderately human-readable but we advise viewing it with one of the many JSON viewers/editors on the web. We advise
against deleting it as should your efforts ever encounter our systems again, they will likley generate errors.
The "application/ld+json" section
This section is generated by our site to share dances around other websites and Search Engines. It complies as far as possible with
schema.org. It treats each dance as a
HowTo. This is a the closest usable type we could find. We've added some properties not supported by
HowTo because
HowTo didn't have anything remotely suitable. Although our site doesn't rely on this section at all, it's probably worth keeping in any derived works as it may allow Search Engines to find it more easilly
Access to the entire database
If you want to access all the dances, perhaps to republish them on your own website in your own format, that's possible!
- It's quite technical, see below
- You need to contact us to get an API-key that is registered to your website
- We have a test API-key that works for any website but only accesses three dances. This key is
test_APIkey_only_outputs_three_dances and you can try it out via this URL
- Your website code will need to
GET eceilidh.org.uk/diversity/whole-database.php?API-key=a-valid-API-key
- The data will be returned in JSON format
- You will need to decode the JSON using a function such as
json_decode (PHP) or JSON.parse (Javascript).
- This should return an array of dance objects
- Each element of the array contains one dance
- In the example below:
- Three dances have been output
- We've expanded the
meta section of the 2nd dance to show the Name of the dance, etc.
- Also expanded is the first element of the
instructions