-
Does remark42 support to show the avatar in the newest comments? If so, how can I show the avatar? In the demo site, it didnt show, too. So I'm not sure about that. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
I try to add the Remark42 into the butterfly theme of Hexo. But i dont know how to show the newest comments in the theme. |
Beta Was this translation helpful? Give feedback.
-
It seems have no API to get the newest comments as JSON or XML. |
Beta Was this translation helpful? Give feedback.
-
I cant find the API of it. Could u give me some suggestions of it? |
Beta Was this translation helpful? Give feedback.
-
pls, use discussions for such questions. |
Beta Was this translation helpful? Give feedback.
-
see the official API docs https://remark42.com/docs/contributing/api/ the method you are looking for is for example: https://demo.remark42.com/api/v1/last/10?site=remark will give you json with the last 10 comments and it includes all the info [
{
"id": "c21a4872-978f-4681-8757-cea61ab2a1b7",
"pid": "",
"text": "<p>g</p>\n",
"orig": "g",
"user": {
"name": "y545yh",
"id": "anonymous_2568b534a8805e3a9c6ee9c657c29b0aa6200375",
"picture": "https://demo.remark42.com/api/v1/avatar/6fa4a372c50c66a01aec36dc0835d70959564cd5.image",
"admin": false,
"site_id": "remark"
},
"locator": {
"site": "remark",
"url": "https://remark42.com/demo/"
},
"score": 0,
"vote": 0,
"time": "2022-05-12T11:08:58.760635374-05:00",
"title": "Demo | Remark42"
},
{
"id": "bc1a21ab-770e-4703-9b45-46a34a726696",
"pid": "",
"text": "<p><code>mkdir test</code></p>\n",
"orig": "`mkdir test`",
"user": {
"name": "metest",
"id": "anonymous_d961d9b0fadd746e039b82f58a06720d62768356",
"picture": "https://demo.remark42.com/api/v1/avatar/fa33cd109cea8e8ccdd2634ab9abd114e6c24e60.image",
"admin": false,
"site_id": "remark"
},
"locator": {
"site": "remark",
"url": "https://remark42.com/demo/"
},
"score": 0,
"vote": 0,
"time": "2022-05-12T10:41:02.146446995-05:00",
"title": "Demo | Remark42"
},
{
"id": "8dc1c478-2c62-42d0-b64e-c519867db54a",
"pid": "",
"text": "<p><code>test</code></p>\n",
"orig": "`test`",
"user": {
"name": "metest",
"id": "anonymous_d961d9b0fadd746e039b82f58a06720d62768356",
"picture": "https://demo.remark42.com/api/v1/avatar/fa33cd109cea8e8ccdd2634ab9abd114e6c24e60.image",
"admin": false,
"site_id": "remark"
},
"locator": {
"site": "remark",
"url": "https://remark42.com/demo/"
},
"score": 0,
"vote": 0,
"time": "2022-05-12T10:40:22.536773606-05:00",
"title": "Demo | Remark42"
},
{
"id": "e251c23a-b8a8-4397-9607-7217e344b571",
"pid": "",
"text": "<p>test</p>\n",
"orig": "test",
"user": {
"name": "test",
"id": "email_402c923fac66be1c8f4b78fb855b05d7ae6e80e5",
"picture": "https://demo.remark42.com/api/v1/avatar/e8d356272335cf713e5e66974c5307364f579999.image",
"admin": false,
"site_id": "remark"
},
"locator": {
"site": "remark",
"url": "https://remark42.com/demo/"
},
"score": 0,
"vote": 0,
"time": "2022-05-12T07:01:36.042258311-05:00",
"title": "Demo | Remark42"
},
{
"id": "581fbc26-e170-49c4-9893-14fcbe5ce59a",
"pid": "bc81b6ec-8f06-4d1c-a4fb-817f41a34690",
"text": "<p>123</p>\n",
"orig": "123",
"user": {
"name": "123",
"id": "anonymous_8127fc6538c494af7de104591c5ad264b7860f0f",
"picture": "https://demo.remark42.com/api/v1/avatar/9ac81f6e8a3a2da9147e5940e92ea6cba2e5ac6f.image",
"admin": false,
"site_id": "remark"
},
"locator": {
"site": "remark",
"url": "https://remark42.com/demo/"
},
"score": 0,
"vote": 0,
"time": "2022-05-12T05:56:16.607923967-05:00",
"title": "Demo | Remark42"
},
{
"id": "bc81b6ec-8f06-4d1c-a4fb-817f41a34690",
"pid": "8e22cd8b-d8cb-40aa-b337-4488cf239636",
"text": "<p>123</p>\n",
"orig": "123",
"user": {
"name": "123",
"id": "anonymous_8127fc6538c494af7de104591c5ad264b7860f0f",
"picture": "https://demo.remark42.com/api/v1/avatar/9ac81f6e8a3a2da9147e5940e92ea6cba2e5ac6f.image",
"admin": false,
"site_id": "remark"
},
"locator": {
"site": "remark",
"url": "https://remark42.com/demo/"
},
"score": 0,
"vote": 0,
"time": "2022-05-12T05:56:13.390330599-05:00",
"title": "Demo | Remark42"
},
{
"id": "8e22cd8b-d8cb-40aa-b337-4488cf239636",
"pid": "",
"text": "<p>111</p>\n",
"orig": "111",
"user": {
"name": "123",
"id": "anonymous_8127fc6538c494af7de104591c5ad264b7860f0f",
"picture": "https://demo.remark42.com/api/v1/avatar/9ac81f6e8a3a2da9147e5940e92ea6cba2e5ac6f.image",
"admin": false,
"site_id": "remark"
},
"locator": {
"site": "remark",
"url": "https://remark42.com/demo/"
},
"score": 0,
"vote": 0,
"time": "2022-05-12T05:56:04.05518991-05:00",
"title": "Demo | Remark42"
},
{
"id": "de6b27e9-ed8d-404d-80b0-c488c0fb16c4",
"pid": "",
"text": "<p>test reply</p>\n",
"orig": "test reply",
"user": {
"name": "hellw_usr_321",
"id": "anonymous_32565fafc1f749c88e821b6790a6d3f5d750b89c",
"picture": "https://demo.remark42.com/api/v1/avatar/b9deed711414df7bbbd9421a4a57d3850ac5b24f.image",
"admin": false,
"site_id": "remark"
},
"locator": {
"site": "remark",
"url": "https://remark42.com/demo/"
},
"score": 0,
"vote": 0,
"time": "2022-05-12T01:30:56.21600708-05:00",
"title": "Demo | Remark42"
},
{
"id": "61112def-cb6a-4bb3-b164-56157797e1fa",
"pid": "",
"text": "<p>rte</p>\n",
"orig": "rte",
"user": {
"name": "y545yh",
"id": "anonymous_2568b534a8805e3a9c6ee9c657c29b0aa6200375",
"picture": "https://demo.remark42.com/api/v1/avatar/6fa4a372c50c66a01aec36dc0835d70959564cd5.image",
"admin": false,
"site_id": "remark"
},
"locator": {
"site": "remark",
"url": "https://remark42.com/demo/"
},
"score": 0,
"vote": 0,
"time": "2022-05-11T23:57:16.833272062-05:00",
"title": "Demo | Remark42"
},
{
"id": "3af4e8d0-2712-409f-a906-248d57ece9f8",
"pid": "",
"text": "<p>jmik</p>\n",
"orig": "\njmik",
"user": {
"name": "y545yh",
"id": "anonymous_2568b534a8805e3a9c6ee9c657c29b0aa6200375",
"picture": "https://demo.remark42.com/api/v1/avatar/6fa4a372c50c66a01aec36dc0835d70959564cd5.image",
"admin": false,
"site_id": "remark"
},
"locator": {
"site": "remark",
"url": "https://remark42.com/demo/"
},
"score": 0,
"vote": 0,
"time": "2022-05-11T23:56:23.541818621-05:00",
"title": "Demo | Remark42"
}
] |
Beta Was this translation helpful? Give feedback.
see the official API docs https://remark42.com/docs/contributing/api/
the method you are looking for is
GET /api/v1/last/{max}?site=site-id&since=ts-msec
- get up to {max} last comments, since (epoch time, milliseconds) is optional`for example: https://demo.remark42.com/api/v1/last/10?site=remark will give you json with the last 10 comments and it includes all the info