Files
CyberPanel/backup/tests.py

11 lines
348 B
Python
Raw Normal View History

2023-02-20 14:59:34 +05:00
import requests
2019-12-10 15:09:10 +05:00
2023-02-20 14:59:34 +05:00
url = "https://api.github.com/repos/rustic-rs/rustic/releases/latest" # Replace with your API endpoint URL
response = requests.get(url)
2017-10-24 19:16:36 +05:00
2023-02-20 14:59:34 +05:00
if response.status_code == 200:
data = response.json()
print(data['tag_name'])
# Do something with the data
else:
print("Request failed with status code:", response.status_code)