Fix docstrings in the api module

This commit is contained in:
Lee Miller 2022-11-16 04:12:34 +02:00
parent 2785e56fab
commit 5e2dcd70af
Signed by untrusted user: lee.miller
GPG Key ID: 4F97A5EA88F4AB63

View File

@ -39,17 +39,18 @@ To use the API concider such simple example:
.. 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
conf = bmconfigparser.BMConfigParser()
api_uri = "http://%s:%s@127.0.0.1:8442/" % (
conf.safeGet('bitmessagesettings', 'apiusername'),
conf.safeGet('bitmessagesettings', 'apipassword')
api_uri = "http://%s:%s@127.0.0.1:%s/" % (
config.safeGet('bitmessagesettings', 'apiusername'),
config.safeGet('bitmessagesettings', 'apipassword'),
config.safeGet('bitmessagesettings', 'apiport')
)
api = jsonrpclib.ServerProxy(api_uri)
api = jsonrpc.ServerProxy(api_uri)
print(api.clientStatus())
@ -1445,8 +1446,8 @@ class BMRPCDispatcher(object):
@command('listConnections')
def HandleListConnections(self):
"""
Returns bitmessage connection information as dict with keys *inbound,
*outbound.
Returns bitmessage connection information as dict with keys *inbound*,
*outbound*.
"""
inboundConnections = []
outboundConnections = []