Skip to content

Commit 48f6bb5

Browse files
🌐 feat(http_client): add DNS records and file moving HTTP methods
- Implemented all_apps_status, move_app_file, and dns_records methods in HTTPClient. - Updated request method for new endpoints.
1 parent d37ba32 commit 48f6bb5

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

squarecloud/http/http_client.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,22 @@ async def get_all_app_backups(self, app_id: str) -> Response:
656656
response: Response = await self.request(route)
657657
return response
658658

659+
async def all_apps_status(self) -> Response:
660+
route: Router = Router(Endpoint.all_apps_status())
661+
response: Response = await self.request(route)
662+
return response
663+
664+
async def move_app_file(self, app_id: str, origin: str, dest: str):
665+
route: Router = Router(Endpoint.move_file(), app_id=app_id)
666+
body = {'path': origin, 'to': dest}
667+
response: Response = await self.request(route, json=body)
668+
return response
669+
670+
async def dns_records(self, app_id: str) -> Response:
671+
route: Router = Router(Endpoint.dns_records(), app_id=app_id)
672+
response: Response = await self.request(route)
673+
return response
674+
659675
@property
660676
def last_response(self) -> Response | None:
661677
"""

0 commit comments

Comments
 (0)