forked from LBRYCommunity/lbry-sdk
rename jsonrpc_comment_edit
-> jsonrpc_comment_update
This commit is contained in:
parent
fc2d9b4fd2
commit
2a7911c7d6
4 changed files with 11 additions and 11 deletions
|
@ -2302,8 +2302,8 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "comment_edit",
|
||||
"description": "Edit a comment published as one of your channels.",
|
||||
"name": "comment_update",
|
||||
"description": "Update a comment published as one of your channels.",
|
||||
"arguments": [
|
||||
{
|
||||
"name": "comment",
|
||||
|
@ -2328,9 +2328,9 @@
|
|||
"examples": [
|
||||
{
|
||||
"title": "Edit the contents of a comment",
|
||||
"curl": "curl -d'{\"method\": \"comment_edit\", \"params\": {\"comment\": \"Where there was once sasquatch, there is not\", \"comment_id\": \"0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb\"}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet comment edit Where there was once sasquatch, there is not --comment_id=0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_edit\", \"params\": {\"comment\": \"Where there was once sasquatch, there is not\", \"comment_id\": \"0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb\"}}).json()",
|
||||
"curl": "curl -d'{\"method\": \"comment_update\", \"params\": {\"comment\": \"Where there was once sasquatch, there is not\", \"comment_id\": \"0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb\"}}' http://localhost:5279/",
|
||||
"lbrynet": "lbrynet comment \"update Where there was once sasquatch, there is not\" --comment_id=0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb",
|
||||
"python": "requests.post(\"http://localhost:5279\", json={\"method\": \"comment_update\", \"params\": {\"comment\": \"Where there was once sasquatch, there is not\", \"comment_id\": \"0dec63ef27fd7d8c76237811b00db797479061caba39ac0f4f3b094aae59a5cb\"}}).json()",
|
||||
"output": "{\n \"jsonrpc\": \"2.0\",\n \"result\": {\n \"error\": {\n \"code\": -32601,\n \"message\": \"The method does not exist / is not available.\"\n },\n \"id\": null,\n \"jsonrpc\": \"2.0\"\n }\n}"
|
||||
}
|
||||
]
|
||||
|
|
|
@ -4559,12 +4559,12 @@ class Daemon(metaclass=JSONRPCServerType):
|
|||
return response
|
||||
|
||||
@requires(WALLET_COMPONENT)
|
||||
async def jsonrpc_comment_edit(self, comment, comment_id, wallet_id=None):
|
||||
async def jsonrpc_comment_update(self, comment, comment_id, wallet_id=None):
|
||||
"""
|
||||
Edit a comment published as one of your channels.
|
||||
|
||||
Usage:
|
||||
comment_edit (<comment> | --comment=<comment>)
|
||||
comment_update (<comment> | --comment=<comment>)
|
||||
(<comment_id> | --comment_id=<comment_id>)
|
||||
[--wallet_id=<wallet_id>]
|
||||
|
||||
|
|
|
@ -352,7 +352,7 @@ class Examples(CommandTestCase):
|
|||
|
||||
await r(
|
||||
'Edit the contents of a comment',
|
||||
'comment', 'edit', 'Where there was once sasquatch, there is not',
|
||||
'comment', 'update', 'Where there was once sasquatch, there is not',
|
||||
f'--comment_id={comment["comment_id"]}'
|
||||
)
|
||||
|
||||
|
|
|
@ -507,7 +507,7 @@ class CommentCommands(CommandTestCase):
|
|||
self.assertIsNotNone(original_cid, 'comment wasnt properly made')
|
||||
self.assertIsNotNone(original_sig, 'comment should have a signature')
|
||||
|
||||
edited = await self.daemon.jsonrpc_comment_edit(
|
||||
edited = await self.daemon.jsonrpc_comment_update(
|
||||
comment='This is a masterpiece, need more like it!',
|
||||
comment_id=original_cid
|
||||
)
|
||||
|
@ -533,7 +533,7 @@ class CommentCommands(CommandTestCase):
|
|||
|
||||
# this should error out
|
||||
with self.assertRaises(ValueError):
|
||||
await self.daemon.jsonrpc_comment_edit(
|
||||
await self.daemon.jsonrpc_comment_update(
|
||||
comment='If you see it and you mean then you know you have to go',
|
||||
comment_id=original_cid
|
||||
)
|
||||
|
@ -548,7 +548,7 @@ class CommentCommands(CommandTestCase):
|
|||
self.assertIsNotNone(anon_cid)
|
||||
|
||||
with self.assertRaises(ValueError):
|
||||
await self.daemon.jsonrpc_comment_edit(
|
||||
await self.daemon.jsonrpc_comment_update(
|
||||
comment='drift drift drift',
|
||||
comment_id=anon_cid
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue