From 76ecb5d50d9861b373868af314b5f24c10dbd7f5 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Wed, 13 Feb 2019 11:14:54 -0500 Subject: [PATCH] renamed resolve argument url to urls --- lbrynet/extras/daemon/Daemon.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lbrynet/extras/daemon/Daemon.py b/lbrynet/extras/daemon/Daemon.py index e7d85776b..f3cabf057 100644 --- a/lbrynet/extras/daemon/Daemon.py +++ b/lbrynet/extras/daemon/Daemon.py @@ -1437,23 +1437,23 @@ class Daemon(metaclass=JSONRPCServerType): return claim_results @requires(WALLET_COMPONENT) - async def jsonrpc_resolve(self, url): + async def jsonrpc_resolve(self, urls: typing.Union[str, list]): """ Get the claim that a URL refers to. Usage: - resolve ... + resolve ... Options: - --url= : (str) one or more urls to resolve + --urls= : (str, list) one or more urls to resolve Returns: - Dictionary of results, keyed by uri - '': { + Dictionary of results, keyed by url + '': { If a resolution error occurs: 'error': Error message - If the uri resolves to a channel or a claim in a channel: + If the url resolves to a channel or a claim in a channel: 'certificate': { 'address': (str) claim address, 'amount': (float) claim amount, @@ -1475,10 +1475,10 @@ class Daemon(metaclass=JSONRPCServerType): 'value': ClaimDict if decoded, otherwise hex string } - If the uri resolves to a channel: + If the url resolves to a channel: 'claims_in_channel': (int) number of claims in the channel, - If the uri resolves to a claim: + If the url resolves to a claim: 'claim': { 'address': (str) claim address, 'amount': (float) claim amount, @@ -1503,7 +1503,8 @@ class Daemon(metaclass=JSONRPCServerType): } """ - urls = [url] if isinstance(url, str) else url + if isinstance(urls, str): + urls = [urls] results = {}