Skip to content
Snippets Groups Projects
Commit 46a74e41 authored by Vincent Texier's avatar Vincent Texier
Browse files

Fix Revoke method missing in core.net.bma

parent fd429695
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@ from .. import API, logging
logger = logging.getLogger("ucoin/node")
class Node(API):
def __init__(self, connection_handler, module='node'):
super(Node, self).__init__(connection_handler, module)
......@@ -31,7 +32,6 @@ class Summary(Node):
def __init__(self, connection_handler, module='node'):
super(Summary, self).__init__(connection_handler, module)
def __get__(self, **kwargs):
return self.requests_get('/summary', **kwargs).json()
......@@ -19,6 +19,7 @@ def timeout(reply, seconds):
logging.debug("Reply aborted because of timeout")
reply.abort()
class ConnectionHandler(object):
"""Helper class used by other API classes to ease passing server connection information."""
......
......@@ -20,6 +20,7 @@ from .. import API, logging
logger = logging.getLogger("ucoin/node")
class Node(API):
def __init__(self, connection_handler, module='node'):
super(Node, self).__init__(connection_handler, module)
......
......@@ -37,6 +37,16 @@ class Add(WOT):
return self.requests_post('/add', **kwargs)
class Revoke(WOT):
"""POST Public key data."""
def __post__(self, **kwargs):
assert 'pubkey' in kwargs
assert 'self_' in kwargs
return self.requests_post('/revoke', **kwargs)
class Lookup(WOT):
"""GET Public key data."""
null_value = \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment