[HELP] Event creation scripts
Hi all,
I am looking for python scripts to upload events automatically. Are any already done? If not, I'll write it.
Looking at the API spec I suppose that the most simple example could be to just:
- Easily create a bot user using Gancio panel
- Create a function to authenticate against this endpoint to get an authorization token for the bot (https://gancio.org/dev/oauth#obtain-a-token)
- Call to create new event function https://gancio.org/dev/api#add-a-new-event. I am not sure which of the body attributes are optional. And either, how to set properly the place if is already on the database. Any working example for this endpoint will be useful.
- Will be enough to send the Bearer token on the authorization header? Or some any configuration have to be done?
- Adapt the script to support image upload
Thanks in advance!
Little Bonus to look for developing
- API endpoint: https://framagit.org/les/gancio/-/blob/master/server/api/index.js?ref_type=heads#L146
- Controller implementation (here the required fields): https://framagit.org/les/gancio/-/blob/master/server/api/controller/event.js?ref_type=heads#L310
- JS test with creation example https://framagit.org/les/gancio/-/blob/master/tests/app.test.js?ref_type=heads#L188
Edited by Ramona sindominio