Closed petermeldrum closed 1 year ago
@petermeldrum am not sure if this is a formatting issue with the github, but it looks like you're mixing up fields from the RPDE spec (state
, kind
, modified
) with those from the modelling spec.
Your RDPE feed should look like:
{
"next": "...",
"license": "...",
"items": [
{
"state": "...",
"modified": "...",
"type": "...",
"id": "...",
"data": {
...fields describing the session from the modelling spec...name, url, etc
}
},
{
...
}
]
}
So the items
array contains a set of objects with a fixed set of properties, all of which are required.
The data
property for each of those items provides the detail on the Event that has been created, modified, etc.
The sameAs
property also looks incorrect. Its value(s) should be other web pages that also identify the Event. I'm not sure you actually need it, so would suggest removing.
Also, the attendeeInstructions
property should have additional instructions for attendees. If you don't have any, then omit the property, rather than including the value "No".
Hope that helps!
Apologies I think part of it is a formatting issue with GitHub. Here's the test endpoint: http://differenzuat.com/opensessionsapi/api/session/GetSessionsForOpenActive
Hi @ldodds, thanks for the feedback.
Just to confirm:
sameAs
property does have web pages that identify the event, however in this session there were none input. If there are no details input then this field should be removed altogether from the feed rather than including the field and stating 'no'.attendeeInstructions
Thanks again,
Hi @ldodds Can I just check whether I have it correct in the previous message.
If we have values then the field should show, if we do not have values then it should be hidden rather than stating No.
Thanks
Pete
Hi @petermeldrum ,
Yep that's right "if we do not have values then it should be hidden rather than stating No.".
The text value "No" would be read as data, and "No" would appear in data consumers websites (e.g. Get Active). Where a property is empty, it should be hidden. If this is particularly hard to do you can also set it to null.
So for an empty property named "emptyProperty" either hide it as follows (it's hidden so you can't see it at all):
{
"propertyWithValue": "some useful value"
}
or set it to null:
{
"propertyWithValue": "some useful value",
"emptyProperty": null
}
Hi @nickevansuk
It turns out that the test data had 'no' written in the fields. The fields will not display if no value is contained. Would you mind taking a final look before I sign off:
http://differenzuat.com/opensessionsapi/api/session/GetSessionsForOpenActive
Thanks again!
Hi @ldodds and @nickevansuk would be really grateful if one of you could confirm Open Sessions new feed is compliant. We are hoping to switch the sites ASAP and I'd like to make sure I have this correct before going live!
In order to have the data conform to the modelling specification, comments are included below:
{
"next": "http://differenzuat.com/opensessionsapi/api/Session/GetSessionsForOpenActive?afterTimestamp=1520317800&afterId=136",
"items": [{
"id": 127,
"state": "updated",
"kind": "session",
"modified": 1520317800, /* must match format of afterTimestamp in next URL */
"data": {
"@context": [ /* Add context */
"https://www.openactive.io/ns/oa.jsonld",
"https://www.openactive.io/ns-beta/oa.jsonld"
],
"type": "Event", /* Added type */
"url": "http://differenzuat.com/opensessionsportal/#/Organisation/SessionDetail?OrganisationId=44&SessionId=65",
"name": "Hartford Football",
"description": "24 Playerss",
"image": "http://differenzuat.com/opensessionsapi/Content/Session/Session_20180215045119.jpeg",
"startDate": "2018-03-06T06:30:00Z",
"endDate": "2018-03-06T07:00:00Z",
"duration": "PT30M",
"activity": [
"Airgun" /* Are you drawing this from the OpenActive activity list? */
],
"ageRange": "16-55", /* include age range, it's currently missing */
"genderRestriction": "Mixed", /* lowercase 'mixed' */
"attendeeInstructions": "-",
"accessibilitySupport": [
"Learning Disability",
"Physical impairment",
"Visual Impairment",
"Mental Health Condition",
"Deaf",
"Please Ask For More Info"
],
"isCoached": false,
"meetingPoint": "10 to 11 AM IST",
"isAccessibleForFree": false,
"organizer": {
"type": "Organization",
"url": "http://differenzuat.com/opensessionsportal/#/Organisation/OrganisationDetail?OrganisationId=44",
"name": "Tampa River",
"description": "Good.",
"sameAs": [
"www.Google.com" /* Ensure this social media address is well formed (e.g. includes 'http://' or 'https://') */
]
},
"beta:contactPoint": { /* As the contact details are primarily for a point of contact, suggest using contactPoint */
"type": "ContactPoint", /* Add type */
"name": "caru",
"email": "caru07@yopmail.com",
"telephone": "7894561230"
},
"offers": [{
"type": "Offer", /* Add type */
"price": "100.00",
"priceCurrency": "GBP",
"acceptedPaymentMethod": [
"Cash" /* This should be a string from http://schema.org/PaymentMethod such as "http://purl.org/goodrelations/v1#Cash" or "http://purl.org/goodrelations/v1#PaymentMethodCreditCard" not just "Cash" */
]
}],
"beta:isFirstSessionAccessibleForFree": false,
"location": {
"type": "Place" /* Add type */
"address": {
"type": "PostalAddress", /* Add type */
"streetAddress": "Birch Grove",
"addressLocality": "Waltham Forest", /* City or Borough */
"addressRegion": "Greater London", /* County */
"addressCountry": "GB", /* Always 'GB' for UK */
"postalCode": "E11 4YG"
},
"geo": {
"type": "GeoCoordinates", /* Add type */
"latitude": 72.808128,
"longitude": 0
}
},
"leader": {
"type": "Person", /* Add type */
"name": "jem"
}
}
}],
"license": "https://creativecommons.org/licenses/by/4.0/"
}
Three additional comments:
With the new recurring schedules feature, the events should output a schedule, rather than just a startDate and endDate: https://www.openactive.io/modelling-opportunity-data/#describing-scheduled-events
On the new opensessions.io there's a style="overflow: hidden;" attribute on the outer html tag that prevents the page from scrolling, which means you can't see the whole schedule tab on certain screen sizes.
Can't see the organizer contact details coming through? These could easily be included in the organizer property
@petermeldrum
Copying your message here:
In "Monthly" and "Yearly" we have two options to schedule sessions. In that second option for both monthly and yearly we can schedule like Monthly : One "First" Monday of every _ Months Yearly : One "First" Monday of every January every year.
Here I cannot find how this data will be set in open active above options.
I cannot find on given URL "https://www.openactive.io/modelling-opportunity-data/#describing-scheduled-events" how this data can be displayed?
See this example for when Bookwhen did the same: https://github.com/openactive/activation/issues/6#issuecomment-312423917
Suggest using the same as Greg
For "every 2nd Thursday of the month":
"eventSchedule": {
...
"byDay": "2TH",
...
}
For "First" Monday of every January every year use byMonth.
"eventSchedule": {
...
"byDay": "1MO",
"byMonth": 1,
"frequency": "yearly"
...
}
@ldodds note we should allow byDay format above in schema as per previous discussion, as this is the second instance of this question.
Apologies also just realised that you're missing the full address block, which must be split down into components:
"address": {
"type": "PostalAddress", /* Add type */
"streetAddress": "Birch Grove",
"addressLocality": "Waltham Forest", /* City or Borough */
"addressRegion": "Greater London", /* County */
"addressCountry": "GB", /* Always 'GB' for UK */
"postalCode": "E11 4YG"
},
You should be able to get these address components from your autocomplete.
Hi @nickevansuk @ldodds
We're having a few issues getting the new Open Sessions feed to come through the imin API correctly. One of the issues that the imin team have flagged is that the feed isn't entirely compliant. I'd be really grateful if one of you wouldn't mind having a quick look at our current endpoint and checking for any potential issues that anyone might need to correct or work around when trying to use the feed?
I can pay in chocolate or coffee,
Thanks, Pete
Hi Nick,
As discussed it would be great to get some support to resolve some of the issues with our endpoint identified by the endpoint.
Resolution: (please see 5.6.8.1- https://www.openactive.io/modelling-opportunity-data/#namespaces) We should be defining either “SessionSeries” - the overall series of events, e.g. Wednesday Yoga “ScheduledSession” - the individual sessions, e.g. Wednesday Yoga on 5th September 2018
We also have a whole bunch of 404 errors:
@petermeldrum the validator has now been updated so all those errors include better explanations. Let me know if you think that covers it?
Additionally:
"type": "SessionSeries"
instead of "type": "Event"
for your usecase. I'd advise changing that first as it'll make the errors more relevant.Sorry if these answers are indirect, but it helps make sure the tool does my job better than i do :)