Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

England Netball #109

Closed
nickevansuk opened this issue Mar 2, 2018 · 1 comment
Closed

England Netball #109

nickevansuk opened this issue Mar 2, 2018 · 1 comment
Labels
example Example JSON from an implementation

Comments

@nickevansuk
Copy link
Contributor

See here: http://data.englandnetball.co.uk/

@philjackson
Copy link

philjackson commented Mar 2, 2018

Great to see you've got a first cut of this. There's a few things that need to be done for this to be standard compliant.

Update your endpoint to use the latest specifications (version 1.0, released August 2017)

We note that the England Netball implementation is labelled as conforming to RPDE 0.2.4 (released May 2016). RPDE 0.2.4 only has limited coverage from data users. To ensure that your data is featured in as many places as possible, please upgrade to the latest specifications (as detailed below).

Note that the ordering strategy used in the England Netball endpoint does not conform to either RPDE 0.2.4 or RPDE 1.0 at present, so the data is not usable as it stands.

Paging Specification 1.0 feedback

  • 4.3.1 describes how the URL must use afterTimestamp and afterId, and includes sample SQL for the query. The current next URL (/api/openactive/sessions?afterId=60) only uses afterId, which usually indicates that the Ordering Strategy has not been implemented. Please check to make especially sure to read the note in 4.3.1.1: "Misreading this query is the single most common cause of incorrect implementation. Please read it carefully and ensure that brackets and comparators are used correctly. > not >= for example."
  • 4.4.1 specifies that the next URL must be an absolute URL.
  • 5.1.5 specifies that the next property on the last page matches the URL of that page. The current next property of the last page is /api/openactive/sessions, which would cause a data consumer to constantly loop through your entire feed.
  • 4.6 specifies how deleted items must be handled. There are no deleted items included in the feed at present, which usually indicates this has not been implemented. It's vital to ensure that events don't disappear from the API if they are deleted from the source system, as if this happens they will live on forever in the downstream apps and services that consume the feed, which will have cached the previously published version indefinitely.

Modelling Specification 1.0 feedback

Please see sample of feed below containing field mappings to match the modelling spec:

{
  "next": "https://api.englandnetball.co.uk/api/openactive/sessions?afterTimestamp=1512099142&afterId=1234",
  "items": [
   {
    "state": "updated",
    "kind": "session",
    "id": 2,
    "modified": 1455634226,
    "data": {
      "@context": "https://www.openactive.io/ns/oa.jsonld",
      "type": "MultidayEvent", /* Use "Event" for all except NYC, use "MultidayEvent" for NYC */
      "identifier": 2, /* id */
      "description": "Event specific description (as opposed to the brand/programme)", /* do you hold this data? if not can use description from programme, and leave programme without description */
      "programme": {
        "type": "Brand",
        "name": "Back to Netball", /* programme_type */
        "description": "Running across England since 2010, over 60,000 women have taken part in Back to Netball and realised the benefits of getting involved.  From losing weight, developing the body’s cardiovascular system and improving muscle tone, taking part in Back to Netball is great for you in so many ways.\r\n\r\nBack to Netball sessions are running across England and provide women of all ages with a gentle re-introduction to the sport.  Run by passionate and enthusiastic coaches, sessions cover the basics of the game including passing, footwork and shooting.  Sessions finish with a friendly game to put the skills you have learnt into practice.\r\n\r\nYou don’t need any special kit, just clothes that you feel comfortable exercising in and trainers ideally that lace up. Make sure you bring some water and that you’ve had a snack a couple of hours before hand, something like our lovely sponsors Mrs Crimbles flapjacks or a banana so you’ve got plenty of energy.",
        "logo": "http://hertsnetball.co.uk/js/plugins/imagemanager/files/B2N_logo.jpg", /* url of static PNG "Back to Netball" logo like this one */
        "url": "https://www.englandnetball.co.uk/backtonetball/", /* url of general programme page */   
        "beta:video": "https://www.youtube.com/watch?v=N268gBOvnzo" /* YouTube URL of programme video */  
      },
      "superEvent": { /* Include for non-NYC only */
        "type": "Event", 
        "identifier": "B2N005364", /* programme_id */
        "eventSchedule": {
          "type": "Schedule",
          "endDate": "2018-06-12", /* lastSessionDate */
          "frequency": "P1W" /* Assuming they are always weekly */
        }
      },
      "startDate": "2015-09-04T20:30:00Z", /* start_time; for NYC this is the start date of the camp */
      "endDate": "2015-09-04T21:30:00Z", /* end_time; for NYC this is the end date of the camp */
      "duration": "PT60M", /* The difference between start_time and end_time e.g. "PT60M". For NYC use num_of_days e.g. "P3D". Note must be converted to ISO spec. Can do this with System.Xml.XmlConvert.ToString(TimeSpan.FromMinutes(ClassDuration)) */
      
      "ageRange": {
           "type": "QuantifiedValue",
           "minValue": 18,
           "maxValue": 55
        }, /* Specific for NYC: age_group; would be good to include this for all if we can */

      "subEvent": { /* Include this for NYC only, to enumerate the the schedule of individual sessions within the camp */
        "type": "Event",
        "name": "Netball Youth Camp Day",
        "duration": "PT5H", /* for NYC, day_duration as number of hours each day (e.g. "10am - 3pm" = "PT5H") */
        "eventSchedule": {
          "type": "Schedule",
          "startDate": "2014-09-01", /* for NYC this is the start date of the camp */
          "repeatCount": 3, /* for NYC num_of_days */
          "frequency": "P1D", /* assume all NYC camps are contiguous */
          "startTime": "10:00", /* for NYC, based on day_duration start time */
          "endTime": "15:00" /* for NYC based on day_duration end time */
        }
      }

      "url": "https://www.englandnetball.co.uk/?pagename=session&sessionid=[60519&B2N005206", /* link to session page on England Netball website */
      "level": "beginner", /* level */
      "eventStatus": "http://schema.org/EventCancelled", /* if cancelled = true; use "http://schema.org/EventScheduled" if cancelled is false */
      "image": "https://www.englandnetball.co.uk/app/plugins/session-finder/public/images/netballnow.jpg", /* do you have any image you could use here? Have suggested the brand balls as one idea? It would end up in a listing such as the following: https://beta.getactivelondon.com/results/list?activity=&location=London%2C+United+Kingdom&lat=51.5073509&lng=-0.1277583&radius=30&page=1&sortBy=distance */
      "genderRestriction": "https://www.openactive.io/ns#Female", /* "https://www.openactive.io/ns#Female", "https://www.openactive.io/ns#Male", or "https://www.openactive.io/ns#Mixed" - very useful for filters on websites such as This Girl Can */
      "leader": {
        "type": "Person",
        "jobTitle": "Bloggs", /* contact_role */
        "telephone": "01234 728381" /* contact_number */
        /* Include the below if you have explicit consent */
        "givenName": "Joe",
        "familyName": "Bloggs",
        "email": "joe@example.com",
      },
      "sameAs": [
        "https://twitter.com/netball", /* twitter_link */
        "https://facebook.com/netball" /* facebook_link */
      ],
      "activity": { /* use for Netball sessions */
          "id": "https://www.openactive.io/activity-list/#fbdc35a8-3dd0-40ee-a7ca-6ff40b3e5f90",
          "type": "Concept",
          "prefLabel": "Netball",
          "inScheme": "https://www.openactive.io/activity-list/activity-list.jsonld"
       },
      "activity": { /* use for Walking Netball sessions */
          "id": "https://www.openactive.io/activity-list/#aba839fb-5cd2-4042-b651-c09c86bce1e2",
          "type": "Concept",
          "prefLabel": "Walking Netball",
          "inScheme": "https://www.openactive.io/activity-list/activity-list.jsonld"
       },
      "organizer": {
        "identifier": 12321, /* Include an organiser ID if you have one, as this is used for organiser-based approval */
        "name": "Toxteth Firefit Hub" /* notice you have an Organiser visible on the website (e.g. https://www.englandnetball.co.uk/?pagename=session&sessionid=[61976&NN005356 ). */ 
      },
      "location": {
        "type": "Place",
        "name": "Toxteth Firefit Hub", /* venue_name */
        "address": {
          "type": "PostalAddress",
          "streetAddress": "Raynes Park High School, 46A West Barnes Lane", /* venue_address_1, venue_address_2 and venue_address_3 comma separated */
          "addressLocality": "London", /* venue_town */
          "addressRegion": "London",  /* venue_county */
          "postalCode": "NW5 3DU", /* venue_postcode */
          "addressCountry": "GB" /* suggest "GB" as a default value */
        },
        "geo": {
          "type": "GeoCoordinates",
          "latitude": 51.403443, /* longitude */
          "longitude": -0.2369089 /* latitude */
        }
      },
      "offers": [
        {
          "type": "Offer",
          "name": "Full price cost", /* costs.name */
          "price": "3.70", /* costs.cost a string */
          "priceCurrency": "GBP",
          "url": "https://...", /* booking_url; only include if "booking_url" links to actual booking page for this offer */
        },
        { /* NYC only */
          "type": "Offer",
          "name": "Member cost", /* costs.name */
          "price": "3.70", /* costs.cost a string */
          "priceCurrency": "GBP",
          "eligibleCustomerType": "http://openactive.io/ns#Member", /* Include this property only for NYC member pricing */
          "url": "https://...", /* booking_url; only include if "booking_url" links to actual booking page for this offer */
        },
        { /* NYC only - discounts - see http://schema.org/Offer for more field info */
          "type": "Offer",
          "name": "Early bird", /* discount name */
          "description": "20% off until September 4", /* text fields to provide discount info */
          "validFrom": "2018-03-04T21:30:00Z", /* offer valid from date, can use on normal priced offers to activate them after early bird period ends */
          "validThrough": "2018-09-04T21:30:00Z", /* discount valid until date */
          "price": "3.70", /* cost with discount applied */
          "priceCurrency": "GBP",
          "eligibleCustomerType": "http://openactive.io/ns#Member", /* Include this property only for NYC member pricing */
          "url": "https://...", /* booking_url; only include if "booking_url" links to actual booking page for this offer */
        }
      ]
    }
   }
  ],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}

Course items

For NYC, the data block will need to be structured as a course ("EventSeries"). The differences are highlighted in the JSON above.

Recurrence discussion

We noticed the field "last_programme_session_date": "2016-03-23" in the data. Is there a link between occurrences of sessions? Do you store a recurrence rule or a session grouping?

Activity discussion

The mapping above assumes that activities are either "Netball" or "Walking Netball". Does the data include Fast5 / FastNet, High 5, Indoor Netball (or Nets)? If so it's probably worth having you engaged in the standards discussion by providing an official list of the types of Netball with descriptions of each to include them in here: https://www.openactive.io/activity-list/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
example Example JSON from an implementation
Projects
None yet
Development

No branches or pull requests

2 participants