]> git.mxchange.org Git - friendica.git/blobdiff - doc/api.md
Merge pull request #2567 from rabuzarus/0606-photo-menu
[friendica.git] / doc / api.md
index f050ae4304f98d7682003100eee6781ce2c63aff..7d6f440c58c0008ecbaf909048c194f1b09c52ff 100644 (file)
@@ -1,6 +1,6 @@
 Friendica API\r
 ===\r
-The Friendica API aims to be compatible to the [GNU Social API](http://skilledtests.com/wiki/Twitter-compatible_API) and the [Twitter API](https://dev.twitter.com/rest/public).\r
+The Friendica API aims to be compatible to the [GNU Social API](http://wiki.gnusocial.de/gnusocial:api) and the [Twitter API](https://dev.twitter.com/rest/public).\r
 \r
 Please refer to the linked documentation for further information.\r
 \r
@@ -52,20 +52,20 @@ Error body is
 \r
 json:\r
 ```\r
-{\r
-"error": "Specific error message",\r
-"request": "API path requested",\r
-"code": "HTTP error code"\r
-}\r
+       {\r
+               "error": "Specific error message",\r
+               "request": "API path requested",\r
+               "code": "HTTP error code"\r
+       }\r
 ```\r
 \r
 xml:\r
 ```\r
-<status>\r
-<error>Specific error message</error>\r
-<request>API path requested</request>\r
-<code>HTTP error code</code>\r
-</status>\r
+       <status>\r
+               <error>Specific error message</error>\r
+               <request>API path requested</request>\r
+               <code>HTTP error code</code>\r
+       </status>\r
 ```\r
 \r
 ---\r
@@ -388,6 +388,18 @@ Friendica doesn't allow showing friends of other users.
 ---\r
 ### statusnet/config (*)\r
 \r
+---\r
+### statusnet/conversation (*; AUTH)\r
+It shows all direct answers (excluding the original post) to a given id.\r
+\r
+#### Parameter\r
+* id: id of the post\r
+* count: Items per page (default: 20)\r
+* page: page number\r
+* since_id: minimal id\r
+* max_id: maximum id\r
+* include_entities: "true" shows entities for pictures and links (Default: false)\r
+\r
 ---\r
 ### statusnet/version (*)\r
 \r
@@ -605,47 +617,47 @@ An image used as profile image has only scale 4-6, other images only 0-3
 \r
 json\r
 ```\r
-{\r
-"id": "photo id"\r
-"created": "date(YYYY-MM-GG HH:MM:SS)",\r
-"edited": "date(YYYY-MM-GG HH:MM:SS)",\r
-"title": "photo title",\r
-"desc": "photo description",\r
-"album": "album name",\r
-"filename": "original file name",\r
-"type": "mime type",\r
-"height": "number",\r
-"width": "number",\r
-"profile": "1 if is profile photo",\r
-"link": {\r
-"<scale>": "url to image"\r
-...\r
-},\r
-// if 'scale' is set\r
-"datasize": "size in byte",\r
-"data": "base64 encoded image data"\r
-}\r
+       {\r
+               "id": "photo id"\r
+               "created": "date(YYYY-MM-GG HH:MM:SS)",\r
+               "edited": "date(YYYY-MM-GG HH:MM:SS)",\r
+               "title": "photo title",\r
+               "desc": "photo description",\r
+               "album": "album name",\r
+               "filename": "original file name",\r
+               "type": "mime type",\r
+               "height": "number",\r
+               "width": "number",\r
+               "profile": "1 if is profile photo",\r
+               "link": {\r
+                       "<scale>": "url to image"\r
+                       ...\r
+               },\r
+               // if 'scale' is set\r
+               "datasize": "size in byte",\r
+               "data": "base64 encoded image data"\r
+       }\r
 ```\r
 \r
 xml\r
 ```\r
-<photo>\r
-<id>photo id</id>\r
-<created>date(YYYY-MM-GG HH:MM:SS)</created>\r
-<edited>date(YYYY-MM-GG HH:MM:SS)</edited>\r
-<title>photo title</title>\r
-<desc>photo description</desc>\r
-<album>album name</album>\r
-<filename>original file name</filename>\r
-<type>mime type</type>\r
-<height>number</height>\r
-<width>number</width>\r
-<profile>1 if is profile photo</profile>\r
-<links type="array">\r
-<link type="mime type" scale="scale number" href="image url"/>\r
-...\r
-</links>\r
-</photo>\r
+       <photo>\r
+               <id>photo id</id>\r
+               <created>date(YYYY-MM-GG HH:MM:SS)</created>\r
+               <edited>date(YYYY-MM-GG HH:MM:SS)</edited>\r
+               <title>photo title</title>\r
+               <desc>photo description</desc>\r
+               <album>album name</album>\r
+               <filename>original file name</filename>\r
+               <type>mime type</type>\r
+               <height>number</height>\r
+               <width>number</width>\r
+               <profile>1 if is profile photo</profile>\r
+               <links type="array">\r
+               <link type="mime type" scale="scale number" href="image url"/>\r
+                       ...\r
+               </links>\r
+       </photo>\r
 ```\r
 \r
 ---\r
@@ -657,29 +669,29 @@ Returns a list of all photo resources of the logged in user.
 \r
 json\r
 ```\r
-[\r
-{\r
-id: "resource_id",\r
-album: "album name",\r
-filename: "original file name",\r
-type: "image mime type",\r
-thumb: "url to thumb sized image"\r
-},\r
-...\r
-]\r
+       [\r
+               {\r
+                       id: "resource_id",\r
+                       album: "album name",\r
+                       filename: "original file name",\r
+                       type: "image mime type",\r
+                       thumb: "url to thumb sized image"\r
+               },\r
+               ...\r
+       ]\r
 ```\r
 \r
 xml\r
 ```\r
-<photos type="array">\r
-<photo id="resource_id"\r
-album="album name"\r
-filename="original file name"\r
-type="image mime type">\r
-"url to thumb sized image"\r
-</photo>\r
-...\r
-</photos>\r
+       <photos type="array">\r
+               <photo id="resource_id"\r
+               album="album name"\r
+               filename="original file name"\r
+               type="image mime type">\r
+                       "url to thumb sized image"\r
+               </photo>\r
+               ...\r
+       </photos>\r
 ```\r
 \r
 \r