]> git.mxchange.org Git - friendica.git/blobdiff - doc/API-Friendica.md
Reverted accidentally reversed parameter order
[friendica.git] / doc / API-Friendica.md
index ea11c793a87b9e6151f591f3c542af5b26c82cba..197a5033e57c8e46c3e0125f258c99b9b02f56db 100644 (file)
@@ -135,7 +135,7 @@ Alias of [`api/conversation/show`](#GET+api%2Fconversation%2Fshow).
 
 ### GET api/statusnet/config
 
-Returns the public Friendica node configuration. 
+Returns the public Friendica node configuration.
 
 ### GET api/gnusocial/config
 
@@ -163,7 +163,7 @@ Add or remove an activity from an item.
 * `attendmaybe`
 
 To remove an activity, prepend the verb with "un", eg. "unlike" or "undislike"
-Attend verbs disable eachother: that means that if "attendyes" was added to an item, adding "attendno" remove previous "attendyes".
+Attend verbs disable each other: that means that if "attendyes" was added to an item, adding "attendno" remove previous "attendyes".
 Attend verbs should be used only with event-related items (there is no check at the moment).
 
 #### Parameters
@@ -305,7 +305,7 @@ Returns [Private Messages](help/API-Entities#Private+message) matching the provi
 #### Parameters
 
 * `searchstring`: string for which the API call should search as '%searchstring%' in field 'body' of all messages of the authenticated user (caption ignored)
-* `getText` (optional): `plain`|`html` If ommited, the title is prepended to the plaintext body in the `text` attribute of the private message objects.
+* `getText` (optional): `plain`|`html` If omitted, the title is prepended to the plaintext body in the `text` attribute of the private message objects.
 * `getUserObjects` (optional): `true`|`false` If `false`, the `sender` and `recipient` attributes of the private message object are absent.
 
 #### Return values
@@ -604,7 +604,7 @@ Sets item table entries for this photo to deleted = 1.
 
 On success:
 
-* JSON return 
+* JSON return
 
 ```json
 {
@@ -633,7 +633,7 @@ Deletes all images with the specified album name, is not reversible -> ensure th
 
 On success:
 
-* JSON return 
+* JSON return
 
 ```json
 {
@@ -646,7 +646,7 @@ On error:
 
 * 403 FORBIDDEN: if not authenticated
 * 400 BADREQUEST: "no albumname specified", "album not available"
-* 500 INTERNALSERVERERROR: "problem with deleting item occured", "unknown error - deleting from database failed"
+* 500 INTERNALSERVERERROR: "problem with deleting item occurred", "unknown error - deleting from database failed"
 
 ### POST api/friendica/photoalbum/update
 
@@ -682,7 +682,7 @@ Get a list of photo albums for the user
 
 #### Parameters
 
-None 
+None
 #### Return values
 
 On success a list of photo album objects:
@@ -690,14 +690,14 @@ On success a list of photo album objects:
 ```json
 [
   {
-       "name": "Wall Photos",
-       "created": "2023-01-22 02:03:19",
-       "count": 4
+    "name": "Wall Photos",
+    "created": "2023-01-22 02:03:19",
+    "count": 4
   },
   {
-       "name": "Profile photos",
-       "created": "2022-11-20 14:40:06",
-       "count": 1
+    "name": "Profile photos",
+    "created": "2022-11-20 14:40:06",
+    "count": 1
   }
 ]
 ```
@@ -724,36 +724,36 @@ On success:
 ```json
 [
   {
-       "created": "2023-02-14 14:31:06",
-       "edited": "2023-02-14 14:31:14",
-       "title": "",
-       "desc": "",
-       "album": "Wall Photos",
-       "filename": "image.png",
-       "type": "image/png",
-       "height": 835,
-       "width": 693,
-       "datasize": 119523,
-       "profile": 0,
-       "allow_cid": "",
-       "deny_cid": "",
-       "allow_gid": "",
-       "deny_gid": "",
-       "id": "899184972463eb9b2ae3dc2580502826",
-       "scale": 0,
-       "media-id": 52,
-       "scales": [
-         {
-               "id": 52,
-               "scale": 0,
-               "link": "https://<server>/photo/899184972463eb9b2ae3dc2580502826-0.png",
-               "width": 693,
-               "height": 835,
-               "size": 119523
-         },
-         ...
-       ],
-       "thumb": "https://<server>/photo/899184972463eb9b2ae3dc2580502826-2.png"
+    "created": "2023-02-14 14:31:06",
+    "edited": "2023-02-14 14:31:14",
+    "title": "",
+    "desc": "",
+    "album": "Wall Photos",
+    "filename": "image.png",
+    "type": "image/png",
+    "height": 835,
+    "width": 693,
+    "datasize": 119523,
+    "profile": 0,
+    "allow_cid": "",
+    "deny_cid": "",
+    "allow_gid": "",
+    "deny_gid": "",
+    "id": "899184972463eb9b2ae3dc2580502826",
+    "scale": 0,
+    "media-id": 52,
+    "scales": [
+      {
+        "id": 52,
+        "scale": 0,
+        "link": "https://<server>/photo/899184972463eb9b2ae3dc2580502826-0.png",
+        "width": 693,
+        "height": 835,
+        "size": 119523
+      },
+      ...
+    ],
+    "thumb": "https://<server>/photo/899184972463eb9b2ae3dc2580502826-2.png"
   },
   ...
 ]
@@ -825,11 +825,11 @@ A Mastodon [Status Entity](https://docs.joinmastodon.org/entities/Status/)
   "spoiler_text": "",
   "visibility": "public",
   "language": "en",
-   ...
+  ...
   "account": {
     "id": "8",
     "username": "testuser2",
-         ...
+    ...
   },
   "media_attachments": [],
   "mentions": [],
@@ -839,7 +839,8 @@ A Mastodon [Status Entity](https://docs.joinmastodon.org/entities/Status/)
   "poll": null,
   "friendica": {
     "title": "",
-    "dislikes_count": 1
+    "dislikes_count": 1,
+    "disliked": true
   }
 }
 ```
@@ -863,11 +864,11 @@ in the body and next/previous link headers in the header
 
 ```json
 [
-       {
-               "id": "6",
-               "username": "testuser1",
-               ...
-       }
+  {
+    "id": "6",
+    "username": "testuser1",
+    ...
+  }
 ]
 ```
 
@@ -886,7 +887,7 @@ Removes the dislike mark (if it exists) on this status for this user
 A Mastodon [Status Entity](https://docs.joinmastodon.org/entities/Status/)
 
 #### Example:
-`https://<server_name>/api/friendica/statuses/341/dislike`
+`https://<server_name>/api/friendica/statuses/341/undislike`
 
 ```json
 {
@@ -899,11 +900,11 @@ A Mastodon [Status Entity](https://docs.joinmastodon.org/entities/Status/)
   "spoiler_text": "",
   "visibility": "public",
   "language": "en",
-   ...
+  ...
   "account": {
     "id": "8",
     "username": "testuser2",
-         ...
+    ...
   },
   "media_attachments": [],
   "mentions": [],
@@ -913,7 +914,8 @@ A Mastodon [Status Entity](https://docs.joinmastodon.org/entities/Status/)
   "poll": null,
   "friendica": {
     "title": "",
-    "dislikes_count": 0
+    "dislikes_count": 0,
+    "disliked": false
   }
 }
 ```