commit ff783f41da1976d4cc4bc4e8e01691bc91adf30d Author: Benjamin Loison Date: Fri Feb 23 17:03:51 2024 +0100 Add `{main,config}.py` diff --git a/config.py b/config.py new file mode 100644 index 0000000..53b1286 --- /dev/null +++ b/config.py @@ -0,0 +1 @@ +TOKEN = 'YOUR_TOKEN' \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..f25b442 --- /dev/null +++ b/main.py @@ -0,0 +1,15 @@ +import requests +import json +import config + +GITEA_INSTANCE = 'https://gitea.lemnoslife.com' + +headers = { + 'Authorization': f'token {config.TOKEN}' +} + +url = f'{GITEA_INSTANCE}/api/v1/repos/Benjamin_Loison/Synchronous_reactive_systems/collaborators' + +collaborators = requests.get(url, headers = headers).json() + +print(json.dumps(collaborators, indent = 4)) \ No newline at end of file