14 lines
506 B
Python
14 lines
506 B
Python
import requests
|
|
import urllib.parse
|
|
|
|
gitlab_pat = 'glpat-mJPdjrPiHCTj2NqNZN_m'
|
|
headers = {'PRIVATE-TOKEN': gitlab_pat}
|
|
|
|
fname = 'src/services/v2/site/rooms/[id]/service.GET.ts'
|
|
file_path = urllib.parse.quote(fname, safe='')
|
|
url = f'https://gitlab.ekeepa.co/api/v4/projects/10/repository/files/{file_path}/raw?ref=main'
|
|
r = requests.get(url, headers=headers)
|
|
print("Status:", r.status_code)
|
|
print(r.text)
|
|
with open('/workspace/personal/room_service_GET.ts', 'w', encoding='utf-8') as f:
|
|
f.write(r.text)
|