From cc6df4f2f0872433306b990d3d59a055f334409b Mon Sep 17 00:00:00 2001 From: video-prize-ranch Date: Sat, 23 Jul 2022 17:51:19 -0400 Subject: [PATCH] Add --- Odysee-API/Comments.adoc | 51 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/Odysee-API/Comments.adoc b/Odysee-API/Comments.adoc index 158f292..034048e 100644 --- a/Odysee-API/Comments.adoc +++ b/Odysee-API/Comments.adoc @@ -3,12 +3,18 @@ Documentation for the comments API. https://github.com/OdyseeTeam/commentron == `POST` List comments - https:/comments.odysee.tv/api/v2?m=comment.List +---- +https://comments.odysee.tv/api/v2?m=comment.List +---- List comments for a claim. -=== `JSON` /api/v2?m=comment.List -[,json] +=== `application/json` Body +top_level:: include replies +sort_by:: 3 - Best, 2 - Controversial, 0 - New +parent_id:: to get replies on the parent + +[source,json] ---- { "jsonrpc": "2.0", @@ -18,11 +24,46 @@ List comments for a claim. "page": 1, "page_size": 10, "top_level": true, - "sort_by: 3, # 3 - Best, 2 - Controversial, 0 - New - "parent_id": "parent comment ID", # For comment replies + "sort_by": 3, + "parent_id": "", "claim_id": "463e63afb35a319f260b36ef8d5c3dc41a98ce28", "channel_id": "ecf0a6be99030d0ad4e10aec11d2c0bab94246ae", "channel_name": "@MusicARetro" } } +---- + +=== `200 OK` Response +[source,json] +---- +{ + "jsonrpc": "2.0", + "result": { + "page": 1, + "page_size": 10, + "total_pages": 1, + "total_items": 7, + "total_filtered_items": 7, + "items": [ + { + "comment": "Yey, Rick is in Odysee! Welcome!", + "comment_id": "f2946bf01a56357eb60bd7ec2934d87f0de011d44084892d31dcc41e0acbb616", + "claim_id": "463e63afb35a319f260b36ef8d5c3dc41a98ce28", + "timestamp": 1607709557, + "signature": "ee374b9d04493664c2657eab83c286a519bde120bd75377b123cf5bb62449befae776c2b10e6274024c575178d52fc202074bd8f1da80f8a60402737972b693f", + "signing_ts": "1607709557", + "channel_id": "54161189c9cb227d65c403a4328606173042cadc", + "channel_name": "@MyAwesomeChannel", + "channel_url": "lbry://@MyAwesomeChannel#54161189c9cb227d65c403a4328606173042cadc", + "currency": "", + "support_amount": 0, + "is_hidden": false, + "is_pinned": false, + "is_fiat": false + } + ], + "has_hidden_comments": false + }, + "id": 1 +} ---- \ No newline at end of file