]> git.mxchange.org Git - friendica.git/blobdiff - doc/API-Mastodon.md
Merge pull request #13348 from annando/retrial
[friendica.git] / doc / API-Mastodon.md
index 7496dc243dfd32f29e542799e15d9a30e9257db0..2798446ba928fb7cb8b53e3d2d69cbde4f9a2563 100644 (file)
@@ -39,7 +39,7 @@ Extensions to the [Mastodon Instance::V2 Entities](https://docs.joinmastodon.org
     * `codename`: The Friendica version code name
     * `db_version`: The database schema version number
 
-Example: 
+Example:
 ```json
 {
   "domain": "friendicadevtest1.myportal.social",
@@ -63,7 +63,12 @@ Extensions to the [Mastodon Status Entities](https://docs.joinmastodon.org/entit
 * `in_reply_to_status`: A fully populated Mastodon Status entity for the replied to status or null it is a post rather than a response
 * `friendica`: Friendica specific properties of a status including:
   * `title`: The Friendica title for a post, or empty if the status is a comment
+  * `delivery_data`: Information about the state of federating a message from the server
+    * `delivery_queue_count`: Total number of remote servers that the status needs to be federated to.
+    * `delivery_queue_done`: Total number of remote servers that have successfully been federated to so far.
+    * `delivery_queue_failed`: Total number of remote servers that have we failed to federate to so far.
   * `dislikes_count`: The number of dislikes that a status has accumulated according to the server.
+  * `disliked`: Whether the API user disliked the status.
 
 Example:
 ```json
@@ -72,26 +77,26 @@ Example:
   "created_at": "2023-02-23T02:45:46.000Z",
   "in_reply_to_id": "356",
   "in_reply_to_status": {
-       "id": "356",
-       "created_at": "2023-02-23T02:45:35.000Z",
-       "in_reply_to_id": null,
-       "in_reply_to_status": null,
-       "in_reply_to_account_id": null,
-       ...
-       "content": "A post from testuser1",
-       ...
-       "account": {
-         "id": "6",
-         "username": "testuser1",
-         "acct": "testuser1",
-         "display_name": "testuser1",
-         ...
-       },
-       ...
-       "friendica": {
-         "title": "",
-         "dislikes_count": 0
-       }
+    "id": "356",
+    "created_at": "2023-02-23T02:45:35.000Z",
+    "in_reply_to_id": null,
+    "in_reply_to_status": null,
+    "in_reply_to_account_id": null,
+    ...
+    "content": "A post from testuser1",
+    ...
+    "account": {
+      "id": "6",
+      "username": "testuser1",
+      "acct": "testuser1",
+      "display_name": "testuser1",
+      ...
+    },
+    ...
+    "friendica": {
+      "title": "",
+      "dislikes_count": 0
+    }
   },
   "in_reply_to_account_id": "6",
   ...
@@ -102,16 +107,21 @@ Example:
   "content": "A reply from testuser2",
   ...
   "account": {
-       "id": "8",
-       "username": "testuser2",
-       "acct": "testuser2",
-       "display_name": "testuser2",
-       ...
+    "id": "8",
+    "username": "testuser2",
+    "acct": "testuser2",
+    "display_name": "testuser2",
+    ...
   },
   ...
   "friendica": {
-       "title": "",
-       "dislikes_count": 0
+    "title": "",
+    "delivery_data": {
+      "delivery_queue_count": 10,
+      "delivery_queue_done": 3,
+      "delivery_queue_failed": 0
+    },
+    "dislikes_count": 0
   }
 }
 ```
@@ -201,10 +211,10 @@ Example:
         - `title`: Explicitly sets the title for a post status, ignored if used on a comment status. For post statuses the legacy behavior is to use any "spoiler text" as the title if it is provided. If both the title and spoiler text are provided for a post status then they will each be used for their respective roles. If no title is provided then the legacy behavior will persist. If you want to create a post with no title but spoiler text then explicitly set the title but set it to an empty string `""`.
 - [`POST /api/v1/statuses`](https://docs.joinmastodon.org/methods/statuses/#create)
     - Does not support `polls` argument as Friendica does not have polls
-    - Additionally to the static values `public`, `unlisted` and `private`, the `visibility` parameter can contain a numeric value with a group id.
+    - Additionally to the static values `public`, `unlisted` and `private`, the `visibility` parameter can contain a numeric value with a circle id.
     - Additional field `quote_id` for the post that is being quote reshared
     - Additional fields `friendica` for Friendica specific parameters:
-       - `title`: Explicitly sets the title for a post status, ignored if used on a comment status. For post statuses the legacy behavior is to use any "spoiler text" as the title if it is provided. If both the title and spoiler text are provided for a post status then they will each be used for their respective roles. If no title is provided then the legacy behavior will persist. If you want to create a post with no title but spoiler text then explicitly set the title but set it to an empty string `""`. 
+       - `title`: Explicitly sets the title for a post status, ignored if used on a comment status. For post statuses the legacy behavior is to use any "spoiler text" as the title if it is provided. If both the title and spoiler text are provided for a post status then they will each be used for their respective roles. If no title is provided then the legacy behavior will persist. If you want to create a post with no title but spoiler text then explicitly set the title but set it to an empty string `""`.
 - [`GET /api/v1/statuses/:id`](https://docs.joinmastodon.org/methods/statuses/#get)
 - [`DELETE /api/v1/statuses/:id`](https://docs.joinmastodon.org/methods/statuses/#delete)
 - [`GET /api/v1/statuses/:id/context`](https://docs.joinmastodon.org/methods/statuses/#context)
@@ -235,11 +245,11 @@ Example:
     - Additional field `with_muted` Pleroma extension to return notifications from muted users, defaults to `false`
     - Additional field `exclude_replies` to only return post statuses not replies/comments, defaults to `false`
 - [`GET /api/v1/timelines/list/:id`](https://docs.joinmastodon.org/methods/timelines/)
-       - Additional field `with_muted` Pleroma extension to return notifications from muted users, defaults to `false`
-       - Additional field `exclude_replies` to only return post statuses not replies/comments, defaults to `false`
+    - Additional field `with_muted` Pleroma extension to return notifications from muted users, defaults to `false`
+    - Additional field `exclude_replies` to only return post statuses not replies/comments, defaults to `false`
 - [`GET /api/v1/timelines/public`](https://docs.joinmastodon.org/methods/timelines/)
-       - Additional field `with_muted` Pleroma extension to return notifications from muted users, defaults to `false`
-       - Additional field `exclude_replies` to only return post statuses not replies/comments, defaults to `false`
+    - Additional field `with_muted` Pleroma extension to return notifications from muted users, defaults to `false`
+    - Additional field `exclude_replies` to only return post statuses not replies/comments, defaults to `false`
 - [`GET /api/v1/timelines/tag/:hashtag`](https://docs.joinmastodon.org/methods/timelines/)
     - Additional field `with_muted` Pleroma extension to return notifications from muted users, defaults to `false`
     - Additional field `exclude_replies` to only return post statuses not replies/comments, defaults to `false`
@@ -255,7 +265,7 @@ Example:
 
 ## Currently unimplemented endpoints
 
-These emdpoints are planned to be implemented somewhere in the future.
+These endpoints are planned to be implemented somewhere in the future.
 
 - [`POST /api/v1/accounts/:id/remove_from_followers`](https://github.com/mastodon/mastodon/pull/16864)
 - [`GET /api/v1/accounts/familiar_followers`](https://github.com/mastodon/mastodon/pull/17700)