Add {main,config}.py

This commit is contained in:
2024-02-23 17:03:51 +01:00
commit ff783f41da
2 changed files with 16 additions and 0 deletions

1
config.py Normal file
View File

@@ -0,0 +1 @@
TOKEN = 'YOUR_TOKEN'

15
main.py Normal file
View File

@@ -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))