forked from LBRYCommunity/lbry-sdk
add channel_list, deprecate channel_list_mine
This commit is contained in:
parent
d98e0e8110
commit
086c843068
3 changed files with 25 additions and 8 deletions
|
@ -18,16 +18,17 @@ at anytime.
|
|||
*
|
||||
|
||||
### Deprecated
|
||||
*
|
||||
* `channel_list_mine`, replaced with `channel_list`
|
||||
*
|
||||
|
||||
### Changed
|
||||
* Check claim schema in `publish` before trying to make the claim, return better error messages
|
||||
*
|
||||
* Renamed `channel_list_mine` to `channel_list`
|
||||
* Changed `channel_list` to include channels where the certificate info has been imported but the claim is not in the wallet
|
||||
|
||||
### Added
|
||||
*
|
||||
* Added `channel_import` and `channel_export` commands
|
||||
* Added `is_mine` field to `channel_list` results
|
||||
|
||||
### Removed
|
||||
*
|
||||
|
|
|
@ -904,7 +904,7 @@ class Wallet(object):
|
|||
|
||||
@defer.inlineCallbacks
|
||||
def channel_list(self):
|
||||
certificates = yield self._get_certificate_claims()
|
||||
certificates = yield self.get_certificates_for_signing()
|
||||
results = []
|
||||
for claim in certificates:
|
||||
formatted = yield self._handle_claim_result(claim)
|
||||
|
|
|
@ -1742,9 +1742,27 @@ class Daemon(AuthJSONRPCServer):
|
|||
|
||||
@AuthJSONRPCServer.auth_required
|
||||
@defer.inlineCallbacks
|
||||
def jsonrpc_channel_list(self):
|
||||
"""
|
||||
Get certificate claim infos for channels that can be published to
|
||||
|
||||
Usage:
|
||||
channel_list
|
||||
|
||||
Returns:
|
||||
(list) ClaimDict, includes 'is_mine' field to indicate if the certificate claim
|
||||
is in the wallet.
|
||||
"""
|
||||
|
||||
result = yield self.session.wallet.channel_list()
|
||||
response = yield self._render_response(result)
|
||||
defer.returnValue(response)
|
||||
|
||||
@AuthJSONRPCServer.deprecated("channel_list")
|
||||
@AuthJSONRPCServer.auth_required
|
||||
def jsonrpc_channel_list_mine(self):
|
||||
"""
|
||||
Get my channels
|
||||
Get certificate claim infos for channels that can be published to (deprecated)
|
||||
|
||||
Usage:
|
||||
channel_list_mine
|
||||
|
@ -1753,9 +1771,7 @@ class Daemon(AuthJSONRPCServer):
|
|||
(list) ClaimDict
|
||||
"""
|
||||
|
||||
result = yield self.session.wallet.channel_list()
|
||||
response = yield self._render_response(result)
|
||||
defer.returnValue(response)
|
||||
return self.jsonrpc_channel_list()
|
||||
|
||||
@AuthJSONRPCServer.auth_required
|
||||
@defer.inlineCallbacks
|
||||
|
|
Loading…
Reference in a new issue