]> git.mxchange.org Git - friendica.git/commitdiff
Add Dislike Friendica API documentation
authorHank Grabowski <hankgrabowski@gmail.com>
Thu, 23 Feb 2023 01:55:52 +0000 (20:55 -0500)
committerHank Grabowski <hankgrabowski@gmail.com>
Thu, 23 Feb 2023 01:55:52 +0000 (20:55 -0500)
doc/API-Friendica.md

index 8460fd4ab6a9f2a80aed4414b2e34d3dbbf793ad..4e640c2889586c3a7a9878b5be3f712f4e86488d 100644 (file)
@@ -715,6 +715,127 @@ General description of profile data in API returns:
 
 ---
 
+### POST api/friendica/statuses/:id/dislike
+
+Marks the given status as disliked by this user
+
+#### Path Parameter
+
+* `id`: the status ID that is being marked
+
+#### Return values
+
+A Mastodon [Status Entity](https://docs.joinmastodon.org/entities/Status/)
+
+#### Example:
+`https://<server_name>/api/friendica/statuses/341/dislike`
+
+```json
+{
+  "id": "341",
+  "created_at": "2023-02-23T01:50:00.000Z",
+  "in_reply_to_id": null,
+  "in_reply_to_status": null,
+  "in_reply_to_account_id": null,
+  "sensitive": false,
+  "spoiler_text": "",
+  "visibility": "public",
+  "language": "en",
+   ...
+  "account": {
+    "id": "8",
+    "username": "testuser2",
+         ...
+  },
+  "media_attachments": [],
+  "mentions": [],
+  "tags": [],
+  "emojis": [],
+  "card": null,
+  "poll": null,
+  "friendica": {
+    "title": "",
+    "dislikes_count": 1
+  }
+}
+```
+
+
+### GET api/friendica/statuses/:id/disliked_by
+
+Returns the list of accounts that have disliked the status as known by the current server
+
+#### Path Parameter
+
+* `id`: the status ID that is being marked
+
+#### Return values
+
+A list of [Mastodon Account](https://docs.joinmastodon.org/entities/Account/) objects
+in the body and next/previous link headers in the header
+
+#### Example:
+`https://<server_name>/api/friendica/statuses/341/disliked_by`
+
+```json
+[
+       {
+               "id": "6",
+               "username": "testuser1",
+               ...
+       }
+]
+```
+
+
+
+### POST api/friendica/statuses/:id/undislike
+
+Removes the dislike mark (if it exists) on this status for this user
+
+#### Path Parameter
+
+* `id`: the status ID that is being marked
+
+#### Return values
+
+A Mastodon [Status Entity](https://docs.joinmastodon.org/entities/Status/)
+
+#### Example:
+`https://<server_name>/api/friendica/statuses/341/dislike`
+
+```json
+{
+  "id": "341",
+  "created_at": "2023-02-23T01:50:00.000Z",
+  "in_reply_to_id": null,
+  "in_reply_to_status": null,
+  "in_reply_to_account_id": null,
+  "sensitive": false,
+  "spoiler_text": "",
+  "visibility": "public",
+  "language": "en",
+   ...
+  "account": {
+    "id": "8",
+    "username": "testuser2",
+         ...
+  },
+  "media_attachments": [],
+  "mentions": [],
+  "tags": [],
+  "emojis": [],
+  "card": null,
+  "poll": null,
+  "friendica": {
+    "title": "",
+    "dislikes_count": 0
+  }
+}
+```
+
+---
+
 ## Deprecated endpoints
 
 - POST api/statuses/mediap