forked from LBRYCommunity/lbry-sdk
renamed resolve argument url to urls
This commit is contained in:
parent
dbc1164562
commit
76ecb5d50d
1 changed files with 10 additions and 9 deletions
|
@ -1437,23 +1437,23 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||||
return claim_results
|
return claim_results
|
||||||
|
|
||||||
@requires(WALLET_COMPONENT)
|
@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.
|
Get the claim that a URL refers to.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
resolve <url>...
|
resolve <urls>...
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--url=<url> : (str) one or more urls to resolve
|
--urls=<urls> : (str, list) one or more urls to resolve
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Dictionary of results, keyed by uri
|
Dictionary of results, keyed by url
|
||||||
'<uri>': {
|
'<url>': {
|
||||||
If a resolution error occurs:
|
If a resolution error occurs:
|
||||||
'error': Error message
|
'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': {
|
'certificate': {
|
||||||
'address': (str) claim address,
|
'address': (str) claim address,
|
||||||
'amount': (float) claim amount,
|
'amount': (float) claim amount,
|
||||||
|
@ -1475,10 +1475,10 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||||
'value': ClaimDict if decoded, otherwise hex string
|
'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,
|
'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': {
|
'claim': {
|
||||||
'address': (str) claim address,
|
'address': (str) claim address,
|
||||||
'amount': (float) claim amount,
|
'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 = {}
|
results = {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue