Page MenuHomePhabricator

Create an API or other means of exposure for Event List
Open, Needs TriagePublic

Description

In the Wikimedia Movement, there are a lot of manually or semi-manually maintained calendars on wiki:

*https://meta.wikimedia.org/wiki/Events_calendar/about

Also, there are off-wiki calendars that would probably benefit from a list of events (i.e. https://diff.wikimedia.org/)

If we had an API for Special:AllEvents (and maybe some demonstration code for using it in Lua), then on-wiki communities could choose how to share the calendar of events in their own context. This kind of API would probably need some ways to filter within the API, for items that meet certain criteria.

Related Objects

Event Timeline

I think we need to be clear on what we want to expose exactly. APIs in the usual sense can only be accessed via HTTP(S), so you could use them in a JS gadget, but not in a lua module. Exposing this kind of list in Lua might be doable but needs to be thought out carefully. If the goal is to let people make their own event lists, we could make Special:AllEvents transcludable instead, and allow filtering via parameters passed in the transclusion.

So in theory you could do this with Javascript using: https://www.mediawiki.org/wiki/Template_gadgets, but you have this competing use case of things like Diff Calendar-- Transcludable with parameters I think would be a partial solution (and maybe a little quicker to allow) but wouldn't allow as much customization of context. However, a transcludable widget might allow us to do other things (like embed in other pages like the NewComer Homepage). I would love to weigh the different options here.

Astinson renamed this task from Create an API for Event List to Create an API or other means of exposure for Event List.Fri, May 24, 8:21 PM

So in theory you could do this with Javascript using: https://www.mediawiki.org/wiki/Template_gadgets

You could, but doesn't mean you should :P I'm generally not a fan of template gadgets, and I generally see them as either workarounds for things that should exist in MW but don't, or as something to use under special circumstances when no other option exists.

Transcludable with parameters I think would be a partial solution (and maybe a little quicker to allow) but wouldn't allow as much customization of context.

That's true. We could tweak the layout a bit (shouldn't be too hard), but we'd be forcing a layout nonetheless.

I would love to weigh the different options here.

Agreed. Also, these are not mutually exclusive. Adding an API endpoint for the event list should be trivial.