WordPress.org

Making WordPress.org

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#1009 closed enhancement (fixed)

WordCamp JSON API: Expose session & speaker relationship

Reported by: tareiking Owned by: iandunn
Milestone: Priority: normal
Component: WordCamp Site & Plugins Keywords: needs-patch
Cc:

Description

When retrieving a individual session via the API (ie: http://sf.wordcamp.org/2014/wp-json/posts/655135), there is no meta / information for the speaker(s) who is assigned to the session.

Similarly, when viewing an individual speaker (http://sf.wordcamp.org/2014/wp-json/posts/652591)

Is it possible to get exposure to the session and speaker relationships via the API?

Change History (7)

#1 @iandunn
4 years ago

Yup, that's already in the works :)

Speakers will have a sessions array with full wcb_session posts, and Sessions will have a speaker post. I've got most of the code written, but there's a recursion bug that I still need to get sorted out.

#2 @tareiking
4 years ago

@iandunn Let me know if you need any help testing a potential patch. A full array session and speaker posts sounds ideal!

Hopefully my tickets aren't doubling up on work you already have planned? If you have a roadmap, I'd be happy to take a look before creating new tickets.

#3 @iandunn
4 years ago

  • Owner set to iandunn
  • Status changed from new to accepted

There's no formal roadmap, I'm just working off the feedback I get. It's good to have tickets, though, so keep on creating them :)

#4 @iandunn
4 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 1533:

WordCamp JSON API: Embed related Speaker and Session posts within each other.

Fixes #1009

#5 @iandunn
4 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Looks like the sessions array for speakers are getting populated with all sessions, not just those assigned to them. That didn't happen on my sandbox, but I'm looking into it.

#6 @iandunn
4 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 1534:

WordCamp JSON API: Allow post__in for unauthenticated sessions queries.

Normally post__in is not a valid query var for unauthenticated users, but if it's left out then the query for sessions returns all available posts, rather than the filtered list that was intended.

Fixes #1009

#7 @iandunn
4 years ago

r1533 has a bug, it only displays a single speaker, even if there are multiple. I started #1020 to discuss a solution.

Note: See TracTickets for help on using tickets.