update code to be consistent with field renames
This commit is contained in:
parent
8e5b4d4b6f
commit
7834520e54
1 changed files with 17 additions and 17 deletions
|
@ -173,13 +173,13 @@ def paginate_list(items: List, page: Optional[int], page_size: Optional[int]):
|
||||||
|
|
||||||
|
|
||||||
def fix_kwargs_for_hub(**kwargs):
|
def fix_kwargs_for_hub(**kwargs):
|
||||||
repeated_fields = {"name", "claim_name", "normalized", "reposted_claim_id", "_id", "public_key_hash",
|
repeated_fields = {"name", "claim_name", "normalized_name", "reposted_claim_id", "_id", "public_key_id",
|
||||||
"public_key_bytes", "signature_digest", "signature", "tx_id", "channel_id",
|
"public_key_bytes", "signature_digest", "signature", "tx_id", "channel_id",
|
||||||
"fee_currency", "media_type", "stream_type", "claim_type", "description", "author", "title",
|
"fee_currency", "media_type", "stream_type", "claim_type", "description", "author", "title",
|
||||||
"canonical_url", "short_url", "claim_id"}
|
"canonical_url", "short_url", "claim_id"}
|
||||||
value_fields = {"offset", "limit", "has_channel_signature", "has_source", "has_no_source",
|
value_fields = {"offset", "limit", "has_channel_signature", "has_source", "has_no_source",
|
||||||
"limit_claims_per_channel", "tx_nout", "remove_duplicates",
|
"limit_claims_per_channel", "tx_nout", "remove_duplicates",
|
||||||
"signature_valid", "is_controlling", "amount_order", "no_totals"}
|
"is_signature_valid", "is_controlling", "amount_order", "no_totals"}
|
||||||
ops = {'<=': 'lte', '>=': 'gte', '<': 'lt', '>': 'gt'}
|
ops = {'<=': 'lte', '>=': 'gte', '<': 'lt', '>': 'gt'}
|
||||||
for key in list(kwargs.keys()):
|
for key in list(kwargs.keys()):
|
||||||
value = kwargs[key]
|
value = kwargs[key]
|
||||||
|
@ -191,11 +191,11 @@ def fix_kwargs_for_hub(**kwargs):
|
||||||
kwargs["tx_nout"] = kwargs.pop("nout")
|
kwargs["tx_nout"] = kwargs.pop("nout")
|
||||||
key = "tx_nout"
|
key = "tx_nout"
|
||||||
if key == "valid_channel_signature":
|
if key == "valid_channel_signature":
|
||||||
kwargs["signature_valid"] = kwargs.pop("valid_channel_signature")
|
kwargs["is_signature_valid"] = kwargs.pop("valid_channel_signature")
|
||||||
if key == "invalid_channel_signature":
|
if key == "invalid_channel_signature":
|
||||||
kwargs["signature_valid"] = not kwargs.pop("invalid_channel_signature")
|
kwargs["is_signature_valid"] = not kwargs.pop("invalid_channel_signature")
|
||||||
if key in {"valid_channel_signature", "invalid_channel_signature"}:
|
if key in {"valid_channel_signature", "invalid_channel_signature"}:
|
||||||
key = "signature_valid"
|
key = "is_signature_valid"
|
||||||
value = kwargs[key]
|
value = kwargs[key]
|
||||||
if key == "has_no_source":
|
if key == "has_no_source":
|
||||||
kwargs["has_source"] = not kwargs.pop("has_no_source")
|
kwargs["has_source"] = not kwargs.pop("has_no_source")
|
||||||
|
@ -2498,7 +2498,7 @@ class Daemon(metaclass=JSONRPCServerType):
|
||||||
[--new_sdk_server=<new_sdk_server>]
|
[--new_sdk_server=<new_sdk_server>]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--name=<name> : (str) claim name (normalized)
|
--name=<name> : (str) claim name (normalized_name)
|
||||||
--text=<text> : (str) full text search
|
--text=<text> : (str) full text search
|
||||||
--claim_id=<claim_id> : (str) full or partial claim id
|
--claim_id=<claim_id> : (str) full or partial claim id
|
||||||
--claim_ids=<claim_ids> : (list) list of full claim ids
|
--claim_ids=<claim_ids> : (list) list of full claim ids
|
||||||
|
|
Loading…
Reference in a new issue