Opened 11 years ago
Closed 10 years ago
#222 closed enhancement (fixed)
Endpoint to retrieve all upcoming events
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | WordCamp Site & Plugins | Keywords: | |
Cc: |
Description
It would be great to have a few endpoints to WordCamp.org to retrieve information. I did played with something but no clue how the site is really structured.
Change History (11)
#2
@
11 years ago
I did saw the code but somehow I thought it was for WordCamp sites only and not central.
My use case is that I will mix the content with multiple event streams to get an overview of all upcoming conferences. So 15 days isn't enough.
I did saw #221 and will follow that one closely and will update the code when that is public.
I can totally understand the name change. Reason I called it that is that I'm working to make a simple WordCamp app. To see how that works out.
#3
@
11 years ago
Haven't made a lot of progress on this the past few weeks because other things have popup up and because of the holidays, but the wordcamp
post type is the next thing on my list to open source.
Instead of waiting for the JSON API to land in Core, we can probably just run it as a plugin.
#4
@
11 years ago
I refactored the current Calendar plugin into a generic API plugin in #256, so you'll be able to make a patch against that to add a classes/json.php
file.
#8
@
11 years ago
Since the data is in a custom post type already, the JSON plugin makes it available automatically, including meta data, via the /posts/
endpoint. We might need to customize the output a little bit, but probably not much.
#9
@
11 years ago
- Cc me@… added
Can't star this issue (#blamenacin), but I'm here to help if you have any queries about the API plugin. :)
#11
@
10 years ago
- Resolution set to fixed
- Status changed from accepted to closed
The JSON API is available now.
e.g., http://central.wordcamp.org/wp-json/posts?type=wordcamp
The official-wordpress-events plugin is an example of something that's using it (on the make/Community events page).
We've already got one that serves an ICS file for the next 15 days. You can access it at http://central.wordcamp.org/calendar.ics and see the code at http://meta.trac.wordpress.org/browser/sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-calendar/wc-calendar.php.
What kind of use cases are you looking at for this?
Most applications would probably want JSON instead of ICS, so I can see us rolling the ICS code into your plugin and then doing any future endpoints in JSON. It'd probably be good to keep the ICS stuff in a separate class, though.
We store lots of meta data about WordCamps in a custom
wordcamp
post type and treat it as canonical, so it'd probably be better to query that inget_wordcamps()
instead of the sites themselves. There are sites like http://central.wordcamp.org and http://plan.wordcamp.org that aren't WordCamps. I'll be moving that plugin to the Meta repo in the next few weeks as part of #221.I'd probably want to rename the plugin to something like 'WordCamp API' or 'WordCamp Endpoints', since 'WordCamp App' isn't very descriptive, and we'd need to wait for the JSON API to land in Core, but overall I like the idea.