This repository has been archived on 2024-07-30. You can view files and clone it, but cannot push or open issues or pull requests.
python-aternos/python_aternos/atfiles.py
2021-10-08 19:35:20 +04:00

28 lines
612 B
Python

from . import atconnect
class AternosFileManager:
def __init__(atserv):
self.atserv = atserv
def listdir(self, path=''):
self.atserv.atserver_request(
f'https://aternos.org/files/{path}',
atconnect.AternosConnect.REQGET
)
def get_file(self, path):
self.atserv.atserver_request(
f'https://aternos.org/panel/ajax/files/download.php?file={path}',
atconnect.AternosConnect.REQGET
)
def get_world(self, world):
self.atserv.atserver_request(
f'https://aternos.org/panel/ajax/worlds/download.php?world={world}',
atconnect.AternosConnect.REQGET
)