Skip to content

Commit d1c57a7

Browse files
feat: update and expand endpoints in endpoints.py
- Changed 'USER' endpoint path to '/users/me' - Added 'ALL_APP_STATUS' endpoint for retrieving statuses of all apps - Added 'ALL_BACKUPS' endpoint for retrieving backups of an app - Updated 'BACKUP' endpoint method to POST and path to '/apps/{app_id}/backups' - Updated 'DELETE_APP' endpoint path to '/apps/{app_id}' - Updated 'UPLOAD_APP' endpoint path to '/apps' - Renamed 'LAST_DEPLOYS' endpoint path to '/apps/{app_id}/deployments' - Added 'CURRENT_WEBHOOK' endpoint for retrieving current deployment webhook status - Updated 'GITHUB_INTEGRATION' endpoint path to '/apps/{app_id}/deploy/webhook' - Updated 'CUSTOM_DOMAIN' endpoint path to '/apps/{app_id}/network/custom'
1 parent aca9472 commit d1c57a7

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

squarecloud/http/endpoints.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,19 @@ class Endpoint:
55
"""Endpoint"""
66

77
ENDPOINTS_V2 = {
8-
'USER': {'METHOD': 'GET', 'PATH': '/user'},
8+
'USER': {'METHOD': 'GET', 'PATH': '/users/me'},
99
'APP_DATA': {'METHOD': 'GET', 'PATH': '/apps/{app_id}'},
1010
'APP_STATUS': {'METHOD': 'GET', 'PATH': '/apps/{app_id}/status'},
11+
'ALL_APP_STATUS': {'METHOD': 'GET', 'PATH': '/apps/status'},
12+
'ALL_BACKUPS': {'METHOD': 'GET', 'PATH': '/apps/{app_id}/backups'},
1113
'LOGS': {'METHOD': 'GET', 'PATH': '/apps/{app_id}/logs'},
1214
'START': {'METHOD': 'POST', 'PATH': '/apps/{app_id}/start'},
1315
'STOP': {'METHOD': 'POST', 'PATH': '/apps/{app_id}/stop'},
1416
'RESTART': {'METHOD': 'POST', 'PATH': '/apps/{app_id}/restart'},
15-
'BACKUP': {'METHOD': 'GET', 'PATH': '/apps/{app_id}/backup'},
17+
'BACKUP': {'METHOD': 'POST', 'PATH': '/apps/{app_id}/backups'},
1618
'COMMIT': {'METHOD': 'POST', 'PATH': '/apps/{app_id}/commit'},
17-
'DELETE_APP': {'METHOD': 'DELETE', 'PATH': '/apps/{app_id}/delete'},
18-
'UPLOAD_APP': {'METHOD': 'POST', 'PATH': '/apps/upload'},
19+
'DELETE_APP': {'METHOD': 'DELETE', 'PATH': '/apps/{app_id}'},
20+
'UPLOAD_APP': {'METHOD': 'POST', 'PATH': '/apps'},
1921
'FILES_LIST': {
2022
'METHOD': 'GET',
2123
'PATH': '/apps/{app_id}/files/list?path={path}',
@@ -34,15 +36,19 @@ class Endpoint:
3436
},
3537
'LAST_DEPLOYS': {
3638
'METHOD': 'GET',
37-
'PATH': '/apps/{app_id}/deploy/list',
39+
'PATH': '/apps/{app_id}/deployments',
40+
},
41+
'CURRENT_WEBHOOK': {
42+
'METHOD': 'GET',
43+
'PATH': '/apps/{app_id}/deployments/current',
3844
},
3945
'GITHUB_INTEGRATION': {
4046
'METHOD': 'POST',
41-
'PATH': '/apps/{app_id}/deploy/git-webhook',
47+
'PATH': '/apps/{app_id}/deploy/webhook',
4248
},
4349
'CUSTOM_DOMAIN': {
4450
'METHOD': 'POST',
45-
'PATH': '/apps/{app_id}/network/custom/{custom_domain}',
51+
'PATH': '/apps/{app_id}/network/custom',
4652
},
4753
'DOMAIN_ANALYTICS': {
4854
'METHOD': 'GET',

0 commit comments

Comments
 (0)