From e03e51d75bd56c0469a9798814654dc0e08c9bf8 Mon Sep 17 00:00:00 2001 From: Jhonatan-Jeferson Date: Thu, 24 Jul 2025 10:10:15 -0300 Subject: [PATCH 1/2] [fix] Changing backups to snapshots on Endpoints --- squarecloud/http/endpoints.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/squarecloud/http/endpoints.py b/squarecloud/http/endpoints.py index 5092d02..7c73d1e 100644 --- a/squarecloud/http/endpoints.py +++ b/squarecloud/http/endpoints.py @@ -9,12 +9,12 @@ class Endpoint: 'APP_DATA': {'METHOD': 'GET', 'PATH': '/apps/{app_id}'}, 'APP_STATUS': {'METHOD': 'GET', 'PATH': '/apps/{app_id}/status'}, 'ALL_APPS_STATUS': {'METHOD': 'GET', 'PATH': '/apps/status'}, - 'ALL_BACKUPS': {'METHOD': 'GET', 'PATH': '/apps/{app_id}/backups'}, + 'ALL_BACKUPS': {'METHOD': 'GET', 'PATH': '/apps/{app_id}/snapshots'}, 'LOGS': {'METHOD': 'GET', 'PATH': '/apps/{app_id}/logs'}, 'START': {'METHOD': 'POST', 'PATH': '/apps/{app_id}/start'}, 'STOP': {'METHOD': 'POST', 'PATH': '/apps/{app_id}/stop'}, 'RESTART': {'METHOD': 'POST', 'PATH': '/apps/{app_id}/restart'}, - 'BACKUP': {'METHOD': 'POST', 'PATH': '/apps/{app_id}/backups'}, + 'BACKUP': {'METHOD': 'POST', 'PATH': '/apps/{app_id}/snapshots'}, 'COMMIT': {'METHOD': 'POST', 'PATH': '/apps/{app_id}/commit'}, 'DELETE_APP': {'METHOD': 'DELETE', 'PATH': '/apps/{app_id}'}, 'UPLOAD_APP': {'METHOD': 'POST', 'PATH': '/apps'}, @@ -148,7 +148,7 @@ def restart(cls) -> Endpoint: def backup(cls) -> Endpoint: """ Returns an Endpoint object that represents the - /apps/{app_id}/backups endpoint. + /apps/{app_id}/snapshots endpoint. """ return cls('BACKUP') @@ -244,7 +244,7 @@ def custom_domain(cls) -> Endpoint: def all_backups(cls) -> Endpoint: """ Returns an Endpoint object that represents the - /apps/{app_id}/backups endpoint. + /apps/{app_id}/snapshots endpoint. """ return cls('ALL_BACKUPS') From 63ee3ab8f028e380e485e1ef9ea44d98fd45873c Mon Sep 17 00:00:00 2001 From: Jhonatan-Jeferson Date: Thu, 24 Jul 2025 15:28:36 -0300 Subject: [PATCH 2/2] [chore] Updating version in user-agent, pyproject and __init__ to 3.7.4 --- pyproject.toml | 2 +- squarecloud/__init__.py | 2 +- squarecloud/http/http_client.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1fa17c0..b5ccf43 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = 'squarecloud-api' -version = '3.7.2' +version = '3.7.4' description = 'SquareCloud API wrapper' authors = ['Robert Nogueira '] repository = 'https://github.com/squarecloudofc/wrapper-api-py' diff --git a/squarecloud/__init__.py b/squarecloud/__init__.py index 54165d7..cbd6ec3 100644 --- a/squarecloud/__init__.py +++ b/squarecloud/__init__.py @@ -45,4 +45,4 @@ 'utils', ] -__version__ = '3.7.2' +__version__ = '3.7.4' diff --git a/squarecloud/http/http_client.py b/squarecloud/http/http_client.py index f808c6c..a27da76 100644 --- a/squarecloud/http/http_client.py +++ b/squarecloud/http/http_client.py @@ -163,7 +163,7 @@ async def request(self, route: Router, **kwargs: Any) -> Response: """ headers = { 'Authorization': self.api_key, - 'User-Agent': 'squarecloud-api/3.5.1', + 'User-Agent': 'squarecloud-sdk-py/3.7.4', } extra_error_kwargs: dict[str, Any] = {}