rest_client.py

first
This commit is contained in:
av1nxsh 2021-03-02 14:24:00 +05:30 committed by crypto_rahino
parent b6641631eb
commit 0dd772e231

View File

@ -75,7 +75,7 @@ class FtRestClient():
:return: json object
"""
return self._post("start")
def stop(self):
"""Stop the bot. Use `start` to restart.
@ -182,6 +182,14 @@ class FtRestClient():
"""
return self._get("show_config")
def ping(self):
"""simple ping"""
if self.show_config()['state']=="running":
return {"status": "pong"}
else:
return{"status": "not_running"}
def logs(self, limit=None):
"""Show latest logs.