GrapheneRPC¶
Note
This is a low level class that can be used in combination with GrapheneClient
This class allows to call API methods exposed by the witness node via websockets. It does not support notifications and is not run asynchronously.
-
class
beemgrapheneapi.graphenerpc.
GrapheneRPC
(urls, user='', password='', **kwargs)¶ This class allows to call API methods synchronously, without callbacks.
It logs in and registers to the APIs:
- database
- history
Parameters: - urls (str) – Either a single Websocket/Http URL, or a list of URLs
- user (str) – Username for Authentication
- password (str) – Password for Authentication
- apis (Array) – List of APIs to register to (default: [“database”, “network_broadcast”])
- num_retries (int) – Try x times to num_retries to a node on disconnect, -1 for indefinitely
Available APIs
- database
- network_node
- network_broadcast
Usage:
Note
This class allows to call methods available via websocket. If you want to use the notification subsystem, please use
GrapheneWebsocket
instead.-
get_request_id
()¶ Get request id.
-
register_apis
()¶ Register apis.
-
rpcconnect
()¶ Connect to next url in a loop.