Fix docstrings in the api module
This commit is contained in:
parent
2785e56fab
commit
5e2dcd70af
19
src/api.py
19
src/api.py
|
@ -39,17 +39,18 @@ To use the API concider such simple example:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
import jsonrpclib
|
from jsonrpclib import jsonrpc
|
||||||
|
|
||||||
from pybitmessage import bmconfigparser, helper_startup
|
from pybitmessage import helper_startup
|
||||||
|
from pybitmessage.bmconfigparser import config
|
||||||
|
|
||||||
helper_startup.loadConfig() # find and load local config file
|
helper_startup.loadConfig() # find and load local config file
|
||||||
conf = bmconfigparser.BMConfigParser()
|
api_uri = "http://%s:%s@127.0.0.1:%s/" % (
|
||||||
api_uri = "http://%s:%s@127.0.0.1:8442/" % (
|
config.safeGet('bitmessagesettings', 'apiusername'),
|
||||||
conf.safeGet('bitmessagesettings', 'apiusername'),
|
config.safeGet('bitmessagesettings', 'apipassword'),
|
||||||
conf.safeGet('bitmessagesettings', 'apipassword')
|
config.safeGet('bitmessagesettings', 'apiport')
|
||||||
)
|
)
|
||||||
api = jsonrpclib.ServerProxy(api_uri)
|
api = jsonrpc.ServerProxy(api_uri)
|
||||||
print(api.clientStatus())
|
print(api.clientStatus())
|
||||||
|
|
||||||
|
|
||||||
|
@ -1445,8 +1446,8 @@ class BMRPCDispatcher(object):
|
||||||
@command('listConnections')
|
@command('listConnections')
|
||||||
def HandleListConnections(self):
|
def HandleListConnections(self):
|
||||||
"""
|
"""
|
||||||
Returns bitmessage connection information as dict with keys *inbound,
|
Returns bitmessage connection information as dict with keys *inbound*,
|
||||||
*outbound.
|
*outbound*.
|
||||||
"""
|
"""
|
||||||
inboundConnections = []
|
inboundConnections = []
|
||||||
outboundConnections = []
|
outboundConnections = []
|
||||||
|
|
Reference in New Issue
Block a user