WordPress.org

Making WordPress.org

Opened 6 years ago

Closed 4 years ago

#222 closed enhancement (fixed)

Endpoint to retrieve all upcoming events

Reported by: markoheijnen Owned by: iandunn
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.

See https://github.com/markoheijnen/WordCamp-App

Change History (11)

#1 @iandunn
6 years ago

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

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 in get_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.

#2 @markoheijnen
6 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 @iandunn
6 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 @iandunn
6 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.

#5 @iandunn
6 years ago

r171 added the wordcamp post type to the Meta repo.

#6 @markoheijnen
6 years ago

Awesome. When I'm back from holiday I will look into it.

#7 @iandunn
5 years ago

related #356

#8 @iandunn
5 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 @rmccue
5 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. :)

#10 @valeriosza
4 years ago

  • Cc valeriosza@… added

#11 @iandunn
4 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).

Note: See TracTickets for help on using tickets.