[wp-meta] [Making WordPress.org] #1020: Only one speaker is exposed via JSON API
Making WordPress.org
noreply at wordpress.org
Thu May 7 18:46:57 UTC 2015
#1020: Only one speaker is exposed via JSON API
--------------------+--------------------------
Reporter: iandunn | Owner:
Type: defect | Status: new
Priority: normal | Component: wordcamp.org
Keywords: |
--------------------+--------------------------
@aagam94 discovered that r1533 only embeds a single speaker into session
posts, even though there can be multiple.
I've been thinking about what the best way to go about fixing that would
be. Ideally we want a `speakers` (plural) item, but we can't simply add
that and remove the `speaker` item, because that would break any clients
that may already be using it.
The traditional approach would be to add a version to the query
parameters, but the 1.x branch of the JSON API doesn't have a standardized
way of doing that, so anything we do would be kind of clunky.
Version 2 [http://v2.wp-api.org/changes-beta-1.html will add versioning,
and also separate core endpoints from custom endpoints] created by plugins
(e.g., `/wp-rest/wp/v2/posts` and `/wp-rest/wordcamp/v1/sessions`), so
maybe the best thing to do is wait until version 2 is available, and then
create custom endpoints to expose meta, embed related posts, etc, rather
than modifying the Core endpoints like we have been doing.
That way we could increment the version whenever we need to make a
breaking change, and it wouldn't affect the Core endpoints.
Since displaying additional speakers isn't a critical issue, I think we
can wait and see what best practices develop around version 2 of the API,
and implement a fix at that time. In the mean time, clients can just
display the first speaker.
I'm open to other suggestions if anybody sees a better way.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/1020>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list