makesweat / opendata

0 stars 0 forks source link

Mapping event availability to Modelling Specification #5

Open nickevansuk opened 6 years ago

nickevansuk commented 6 years ago

The below is a suggestion to map the Event Availability API to the emerging open booking standard, by aligning it with the existing modelling specification.

{
  "@context": "https://www.openactive.io/ns/oa.jsonld",
  "type": "Event",
  "identifier": 9209, /* integer EventID */
  "organizer": {
    "type": "Organization",
    "identifier": 225, /* integer ClubID */
  },
  "name": "Speedball",
  "beta:formattedDescription": "<p>An action packed, fast paced game that incorporates netball, handball and football.<\/p>",
  "startDate": "2018-01-27T11:00:00Z",
  "remainingAttendeeCapacity": 1, /* can we make this an actual integer of spaces remaining? */
  "offers": [
    {
      "type":"Offer",
      "identifier": 159, /* integer PasstypeID */
      "name": "London Unlimited ",
      "description": "This is a 30 day unlimited London game pass.  This pass renews each month but you can cancel at any time.",
      "price": "39.00",
      "priceCurrency":"GDP",
      "eligibleQuantity": 10,
      "eligibleDuration": "P30D" /* Note is in ISO format as you've done with the original publishing endpoint */
    }
  ]
}
nickbaileyuk commented 6 years ago

"priceCurrency":"GDP" => GBP

nickbaileyuk commented 6 years ago

Updated version at https://makesweat.com/service/openactive.php?geteventinfo&eventid=9205&token=xMn2GTaMB6dwtJ4vlVK77A