-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathnode.py
More file actions
30 lines (22 loc) · 996 Bytes
/
node.py
File metadata and controls
30 lines (22 loc) · 996 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from typing import Optional
from client.resource import Resource
from client.types import Response
from client.types.node import (
NodeConfigurationResponse,
NodeCryptoResponse,
NodeFeesQuery,
NodeFeesResponse,
NodeStatusResponse,
NodeSyncingResponse,
)
class Node(Resource):
def status(self) -> Response[NodeStatusResponse]:
return self.with_endpoint('api').request_get('node/status')
def syncing(self) -> Response[NodeSyncingResponse]:
return self.with_endpoint('api').request_get('node/syncing')
def configuration(self) -> Response[NodeConfigurationResponse]:
return self.with_endpoint('api').request_get('node/configuration')
def crypto(self) -> Response[NodeCryptoResponse]:
return self.with_endpoint('api').request_get('node/configuration/crypto')
def fees(self, query: Optional[NodeFeesQuery] = None) -> Response[NodeFeesResponse]:
return self.with_endpoint('api').request_get('node/fees', query)