Calendar API?

One of the really cool features of Fixometer is the ability to subscribe to all group events in your personal calendar feed. Which you access from a button on the group page:

That provides a link, for example: https://restarters.net/calendar/group/410 for Repair Cafe Gosport. Put that into your preferred online calendar, then the magic happens.

I am currently developing scripts to automate the setup of our Repair Cafe Events. Step one, of course, is to write the tests on the manual process.

Can anyone point me to the documentation for this API and, ideally, a Python library that allows you to query it?

Keith

3 Likes

The API is not well documented, but the code is in Github

AFAIK, there isn’t any kind of library to accompany it, Python or otherwise.

You can simply make HTTP requests and parse the resulting JSON. Be sure to use the “V2” URLs (see Route::prefix(‘v2’))

https://restarters.net/api/v2/groups/410

https://restarters.net/api/v2/groups/410/events
3 Likes

There’s auto-generated documentation of the API at https://restarters.net/apiv2/documentation/. It’s not complete but might give an idea in certain places.

As Monique says, we don’t officially maintain any client libraries.

You mention setting up events - would you like to do the creation via the API? Or you’re only reading the data out? If the former, an API token is required (which I’m happy to provide).

2 Likes

Aha, I did not know about that, perhaps a link could be added to the repo’s README and the api.php script?

1 Like

Thank you @Monique and @neil

This information has given me some new ideas to be a lot bolder in my automations ambitions, for example:

  • Setting up events on restarters and tito all in one script.
  • Maybe even logging fix data back to the system via the API

I will have have a play with the read-only part first, starting by cross-checking the event defined in the Tito system with the Restarters

2 Likes

@neil

I have made a Python wrapper for the API. I looked at using an automated generator from the open-api definitions, but that was not making full use of the Python features, so I ended up hand-coding it in the end.

It can be downloaded from pypi: pyRestarters

All the code is in GitHub: https://github.com/krcb197/pyRestarters

One of the examples is making a map of all the UK repair cafe events this month:

Thank you for all your help

3 Likes

That’s fantastic, thanks for sharing Keith! :slight_smile:

I will point people to your repo if they are looking for something similar, it is a lovely community resource to have.