From 521853863b4c3a01cbf56721331366d470746150 Mon Sep 17 00:00:00 2001 From: ytemiloluwa Date: Sun, 26 May 2024 13:21:53 +0100 Subject: [PATCH] base: _get_pools and get_pools --- pyasic/miners/base.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pyasic/miners/base.py b/pyasic/miners/base.py index f909d378..ecf462de 100644 --- a/pyasic/miners/base.py +++ b/pyasic/miners/base.py @@ -29,6 +29,7 @@ from pyasic.device.makes import MinerMake from pyasic.errors import APIError from pyasic.logger import logger from pyasic.miners.data import DataLocations, DataOptions, RPCAPICommand, WebAPICommand +from pyasic.data.pools import PoolMetrics class MinerProtocol(Protocol): @@ -341,6 +342,14 @@ class MinerProtocol(Protocol): """ return await self._get_uptime() + async def get_pools(self) -> List[PoolMetrics]: + """ Get the pools information from Miner. + + Return: + The pool information of the miner. + """ + return await self._get_pools() + async def _get_mac(self) -> Optional[str]: pass @@ -392,6 +401,9 @@ class MinerProtocol(Protocol): async def _get_uptime(self) -> Optional[int]: pass + async def _get_pools(self) -> List[PoolMetrics]: + pass + async def _get_data( self, allow_warning: bool,