Skip to content
Snippets Groups Projects
Commit 3341a90e authored by inso's avatar inso
Browse files

Fixing coin listing

parent 37fbe11a
Branches
Tags
No related merge requests found
...@@ -23,14 +23,18 @@ logger = logging.getLogger("ucoin/hdc/coins") ...@@ -23,14 +23,18 @@ logger = logging.getLogger("ucoin/hdc/coins")
class Coins(HDC): class Coins(HDC):
def __init__(self, pgp_fingerprint, server=None, port=None): def __init__(self, server=None, port=None):
super().__init__('hdc/coins/%s' % pgp_fingerprint, server, port) super().__init__('hdc/coins', server, port)
class List(Coins): class List(Coins):
def __init__(self, pgp_fingerprint, server=None, port=None):
super().__init__(server=server, port=port)
self.pgp_fingerprint = pgp_fingerprint
"""GET a list of coins owned by [PGP_FINGERPRINT].""" """GET a list of coins owned by [PGP_FINGERPRINT]."""
def __get__(self, **kwargs): def __get__(self, **kwargs):
return self.requests_get('/list', **kwargs).json() return self.requests_get('/list/%s' % self.pgp_fingerprint, **kwargs).json()
from . import view from . import view
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment