WordCamp-Android
WordCamp-Android copied to clipboard
Migrate to v2 endpoints
The V1 endpoints are now deprecated, and will be disabled in 1 year, on 2018-04-01.
Here are the new endpoints:
- https://central.wordcamp.org/wp-json/wp/v2/wordcamps/
- https://2016.misc.wordcamp.dev/wp-json/wp/v2/sessions/
- https://2016.misc.wordcamp.dev/wp-json/wp/v2/speakers/
If you want speakers embedded in session responses, or vice-versa, you can append the ?_embed parameter, and then pull them from the _embedded field. The API handbook has details.
Let me know if you have any questions or run into any problems with the API.
@aagam-shah, it looks like you might already have this working, but I don't see a PR for it. Is it ready to send a PR, or does it need more work?
@iandunn - I had started but have left in-between. Will work on it and raise the PR as soon as it's ready
The date for disabling the v1 endpoints has passed, though are still active right now.
In relation to #73, I believe that the current query of pulling the last 50 WCs, ordered by ID is flawed, and a slightly different approach is needed when switching to the v2 endpoints.
The v2 endpoint has event start and end date fields:

Each refresh should, over one or more requests, order by the start or end date, and keep retrieving more entries until the end date of an event is earlier than the current date (no point in storing WCs that finished yesterday or earlier).
This will then capture events like WC Europe 2018, which has a low ID (registered early on), but whose start/end date is coming soon.
#74 appears to be a PR for this issue.