74 lines
2.5 KiB
Python
74 lines
2.5 KiB
Python
from API import BaseMinerAPI
|
|
|
|
|
|
class UnknownAPI(BaseMinerAPI):
|
|
def __init__(self, ip, port=4028):
|
|
super().__init__(ip, port)
|
|
|
|
async def asccount(self) -> dict:
|
|
return await self.send_command("asccount")
|
|
|
|
async def asc(self, n: int) -> dict:
|
|
return await self.send_command("asc", parameters=n)
|
|
|
|
async def devdetails(self) -> dict:
|
|
return await self.send_command("devdetails")
|
|
|
|
async def devs(self) -> dict:
|
|
return await self.send_command("devs")
|
|
|
|
async def edevs(self, old: bool = False) -> dict:
|
|
if old:
|
|
return await self.send_command("edevs", parameters="old")
|
|
else:
|
|
return await self.send_command("edevs")
|
|
|
|
async def pools(self) -> dict:
|
|
return await self.send_command("pools")
|
|
|
|
async def summary(self) -> dict:
|
|
return await self.send_command("summary")
|
|
|
|
async def stats(self) -> dict:
|
|
return await self.send_command("stats")
|
|
|
|
async def version(self) -> dict:
|
|
return await self.send_command("version")
|
|
|
|
async def estats(self) -> dict:
|
|
return await self.send_command("estats")
|
|
|
|
async def check(self) -> dict:
|
|
return await self.send_command("check")
|
|
|
|
async def coin(self) -> dict:
|
|
return await self.send_command("coin")
|
|
|
|
async def lcd(self) -> dict:
|
|
return await self.send_command("lcd")
|
|
|
|
async def switchpool(self, n: int) -> dict:
|
|
# BOS has not implemented this yet, they will in the future
|
|
raise NotImplementedError
|
|
# return await self.send_command("switchpool", parameters=n)
|
|
|
|
async def enablepool(self, n: int) -> dict:
|
|
# BOS has not implemented this yet, they will in the future
|
|
raise NotImplementedError
|
|
# return await self.send_command("enablepool", parameters=n)
|
|
|
|
async def disablepool(self, n: int) -> dict:
|
|
# BOS has not implemented this yet, they will in the future
|
|
raise NotImplementedError
|
|
# return await self.send_command("disablepool", parameters=n)
|
|
|
|
async def addpool(self, url: str, username: str, password: str) -> dict:
|
|
# BOS has not implemented this yet, they will in the future
|
|
raise NotImplementedError
|
|
# return await self.send_command("addpool", parameters=f"{url}, {username}, {password}")
|
|
|
|
async def removepool(self, n: int) -> dict:
|
|
# BOS has not implemented this yet, they will in the future
|
|
raise NotImplementedError
|
|
# return await self.send_command("removepool", parameters=n)
|