Proposer
ODI
Requirements
Proposal
- Replace
"kind" with JSON-LD "@type"
- Use JSON-LD
"@id"
- Augment JSON-LD with
"@modified" to allow any entity to have a modified date
- Augment JSON-LD with
"@deleted" to allow any entity to have a "deleted" state (using a boolean instead of the current updated|deleted field as there are only two possible values for that field).
- Use
@ for type, id, modified and deleted, to distinguish between control properties and data properties.
- Items with
"@deleted": true MUST only include "@id", "@modified" and "@deleted" properties (note that the Opportunity API could also return such small response for objects that have been deleted, for consistency).
"@id" and "@modified" are also used in the Opportunity API to allow items retrieved to be comparable to the those in the feed.
- Make
"items" singular in line with schema.org naming contentions
- Add
"type": "RealtimePage" and "@context": "https://openactive.io/" to the base of the feed
"@modified" MUST use ISO 8601 format with sub-millisecond precision
Example
{
"@context": "https://openactive.io/",
"type": "RealtimePage"
"next": "http://api.letsride.co.uk/public/v1/rides?afterModified=2018-09-30T18%3A45%3A10.263Z&afterId=http%3A%2F%2Fwww.example.com%2Fevents%2F2710",
"item": [
{
"@id": "http://www.example.com/events/2710",
"@type": "SessionSeries",
"@modified": "2018-09-30T18:45:10.242Z",
"name": "Speedball",
"offers": [
{
"@type": "Offer",
"@id": "https://example.com/events/2710#/offers/878",
"validThrough": "2018-10-29T11:00:00Z",
"validFrom": "2018-10-01T11:00:00Z",
"description": "Winger space for Speedball.",
"name": "Speedball winger position",
"price": 10.00,
"priceCurrency": "GBP",
"isCancellable": true,
"cancellationValidUntil": "2018-10-28T11:00:00Z"
}
],
"duration": "PT1H",
"organizer": {
"@type": "Organization",
"name": "Central Speedball Association",
"url": "http://www.speedball-world.com",
"termsOfService": { "type": "TermsOfService", "url": "url"}
},
},
{
"@id": "http://www.example.com/events/2710",
"@type": "SessionSeries",
"@modified": "2018-09-30T18:45:10.263Z",
"@deleted": true
}
],
"license": "https://creativecommons.org/licenses/by/4.0/"
}
Open questions
- "modified" as ISO 8601 format with sub-millisecond precision - is this necessary? As long as the format is consistent between the Opportunity API and RPDE feed could we still use native integer changeNumber as the timestamp instead?
Proposer
ODI
Requirements
Proposal
"kind"with JSON-LD"@type""@id""@modified"to allow any entity to have a modified date"@deleted"to allow any entity to have a "deleted" state (using a boolean instead of the currentupdated|deletedfield as there are only two possible values for that field).@fortype,id,modifiedanddeleted, to distinguish between control properties and data properties."@deleted": trueMUST only include"@id","@modified"and"@deleted"properties (note that the Opportunity API could also return such small response for objects that have been deleted, for consistency)."@id"and"@modified"are also used in the Opportunity API to allow items retrieved to be comparable to the those in the feed."items"singular in line with schema.org naming contentions"type": "RealtimePage"and"@context": "https://openactive.io/"to the base of the feed"@modified"MUST use ISO 8601 format with sub-millisecond precisionExample
Open questions