Create script to pull upcoming LoCo events from loco.ubuntu.com REST API

Bug #1487595 reported by Elizabeth K. Joseph
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Weekly Newsletter
Fix Released
Wishlist
Nathan Handler

Bug Description

Currently our newsletter just points to a link on loco.ubuntu.com for upcoming events. Michael Hall noted that there is a REST API that we can instead query to pull out events in a date range and post them into a newsletter.

So we need to:

1. Learn the address of the REST API for loco.ubuntu.com

2. Write a Python script to pull all events coming up in the next two weeks and formatted for pasting into the wiki

My vision for format is a bullet-point list:

 * Event name, LoCo Team: https://loco.ubuntu.com/...

Related branches

Changed in uwn:
importance: Undecided → Wishlist
Revision history for this message
Nathan Handler (nhandler) wrote :

It looks like a GET request can be made to a URL like http://loco.ubuntu.com/services/events/?date_begin__gte=2015-08-21&date_begin__lte=2015-08-23 to get all events within the time period specified.

Changed in uwn:
status: New → In Progress
assignee: nobody → Nathan Handler (nhandler)
Revision history for this message
Nathan Handler (nhandler) wrote :
Download full text (4.3 KiB)

Adding a few more details. https://wiki.ubuntu.com/LoCoTeamPortal/API has the full API documentation. Getting all events using http://loco.ubuntu.com/services/events/?date_begin__gte=2015-08-21&date_begin__lte=2015-09-04 returns something like this:

[{"date_begin": "2015-08-22 07:00:00", "description": "Die Ubuntu Community hat einen Stand auf der FrOSCon.", "date_end": "2015-08-23 16:00:00", "registration": "", "venue": null, "created_by": 5549, "teams": [15], "contact": 5571, "date_created": "2015-05-23 10:00:53.407200", "announce": "", "global_event": null, "id": 3115, "channel": "", "name": "FrOSCon"}, {"date_begin": "2015-08-24 18:00:00", "description": "Wir wollen uns von den deutschsprachigen \u00dcbersetzern treffen, um aktuelle \u00dcbersetzungen zu besprechen, abzusprechen, was die einzelnen in der n\u00e4chsten Zeit machen und alle offenen Fragen kl\u00e4ren.\r\n\r\nEs k\u00f6nnen auch neue \u00dcbersetzer hinzu sto\u00dfen, so dass sie gleich mit eingebunden werden k\u00f6nnen.\r\n\r\nN\u00e4here Informationen zum Thema \u00dcbersetzungen in Ubuntu gibt es auf der folgenden Wikiseite: \r\nhttps://wiki.ubuntu.com/UbuntuGermanTranslators", "date_end": "2015-08-24 20:00:00", "registration": "", "venue": null, "created_by": 3472, "teams": [15], "contact": 3493, "date_created": "2015-07-27 19:02:57.764119", "announce": "", "global_event": null, "id": 3182, "channel": "#ubuntu-de-l10n", "name": "\u00dcbersetzertreffen"}, {"date_begin": "2015-08-28 01:00:00", "description": "Come and learn about Ubuntu (a Linux Operating System) for your personal computer and the FREE and Open Source Software that is available as an\r\nalternative to Microsoft Windows and other software that you must buy.", "date_end": "2015-08-28 02:00:00", "registration": "", "venue": 1215, "created_by": 5294, "teams": [3], "contact": 5316, "date_created": "2015-06-16 00:17:35.897772", "announce": "http://www.azloco.org/node/28", "global_event": 2979, "id": 3160, "channel": "#ubuntu-us-az", "name": "Sierra Vista Ubuntu Hour"}, {"date_begin": "2015-08-28 02:00:00", "description": "Stop to see us or learn about Ubuntu linux or open source or just to hang out a while. This a 1-2 hour social hour to meet new/old users and chat about linux and open source.", "date_end": "2015-08-28 04:00:00", "registration": "", "venue": 743, "created_by": null, "teams": [3], "contact": 2210, "date_created": "2012-04-20 01:00:32.757728", "announce": "http://www.azloco.org/node/28", "global_event": 2979, "id": 3162, "channel": "#ubuntu-us-az", "name": "Tempe Ubuntu Hour"}, {"date_begin": "2015-09-03 02:00:00", "description": "Stop to see us or learn about Ubuntu linux or open source or just to hang out a while. This a 1-2 hour social hour to meet new/old users and chat about linux and open source.", "date_end": "2015-09-03 04:00:00", "registration": "", "venue": 1063, "created_by": null, "teams": [3], "contact": 2210, "date_created": "2012-04-20 01:00:32.757728", "announce": "http://www.azloco.org/node/28", "global_event": 2979, "id": 3195, "channel": "#ubuntu-us-az", "name": "West side Ubuntu Hour"}]

We can figure out the team associated with an event by making a call to http://loco.ubunt...

Read more...

Changed in uwn:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.