]> git.mxchange.org Git - friendica.git/blobdiff - doc/api.md
Merge remote-tracking branch 'upstream/master'
[friendica.git] / doc / api.md
index 02295a95fef7567afed75bcfe7b347be4b26a151..b759b4697c0dbd51721745f2102939bbca8deed0 100644 (file)
@@ -1,5 +1,8 @@
 Friendica API\r
 ===\r
+\r
+* [Home](help)\r
+\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
@@ -104,7 +107,7 @@ Unofficial Twitter command. It shows all direct answers (excluding the original
 * max_id: maximum id\r
 * getText: Defines the format of the status field. Can be "html" or "plain"\r
 * include_entities: "true" shows entities for pictures and links (Default: false)\r
-* friendica_verbose: "true" enables different error returns for Windows 10 app (default: "false")\r
+* friendica_verbose: "true" enables different error returns (default: "false")\r
 \r
 #### Unsupported parameters\r
 * skip_status\r
@@ -117,7 +120,7 @@ Unofficial Twitter command. It shows all direct answers (excluding the original
 * since_id: minimal id\r
 * max_id: maximum id\r
 * getText: Defines the format of the status field. Can be "html" or "plain"\r
-* friendica_verbose: "true" enables different error returns for Windows 10 app (default: "false")\r
+* friendica_verbose: "true" enables different error returns (default: "false")\r
 \r
 ---\r
 ### direct_messages/conversation (*; AUTH)\r
@@ -129,7 +132,7 @@ Shows all direct messages of a conversation
 * max_id: maximum id\r
 * getText: Defines the format of the status field. Can be "html" or "plain"\r
 * uri: URI of the conversation\r
-* friendica_verbose: "true" enables different error returns for Windows 10 app (default: "false")\r
+* friendica_verbose: "true" enables different error returns (default: "false")\r
 \r
 ---\r
 ### direct_messages/sent (*; AUTH)\r
@@ -140,7 +143,7 @@ Shows all direct messages of a conversation
 * max_id: maximum id\r
 * getText: Defines the format of the status field. Can be "html" or "plain"\r
 * include_entities: "true" shows entities for pictures and links (Default: false)\r
-* friendica_verbose: "true" enables different error returns for Windows 10 app (default: "false")\r
+* friendica_verbose: "true" enables different error returns (default: "false")\r
 \r
 ---\r
 ### direct_messages/new (POST,PUT; AUTH)\r
@@ -157,7 +160,7 @@ Shows all direct messages of a conversation
 * id: id of the message to be deleted\r
 * include_entities: optional, currently not yet implemented\r
 * friendica_parenturi: optional, can be used for increased safety to delete only intended messages\r
-* friendica_verbose: "true" enables different error returns for Windows 10 app (default: "false")\r
+* friendica_verbose: "true" enables different error returns (default: "false")\r
 \r
 #### Return values\r
 \r
@@ -744,6 +747,38 @@ On success:
 On error:\r
 * different JSON returns {"result":"error","message":"searchstring not specified"}\r
 \r
+---\r
+### friendica/profile/show (GET; AUTH)\r
+show data of all profiles or a single profile of the authenticated user\r
+\r
+#### Parameters\r
+* profile_id: id of the profile to be returned (optional, if omitted all profiles are returned by default)\r
+\r
+#### Return values\r
+On success: Array of:\r
+\r
+* multi_profiles: true if user has activated multi_profiles\r
+* global_dir: URL of the global directory set in server settings\r
+* friendica_owner: user data of the authenticated user\r
+* profiles: array of the profile data\r
+\r
+On error: \r
+HTTP 403 Forbidden: when no authentication provided\r
+HTTP 400 Bad Request: if given profile_id is not in db or not assigned to authenticated user\r
+\r
+General description of profile data in API returns:\r
+* profile_id\r
+* profile_name\r
+* is_default: true if this is the public profile\r
+* hide_friends: true if friends are hidden\r
+* profile_photo\r
+* profile_thumb\r
+* publish: true if published on the server's local directory\r
+* net_publish: true if published to global_dir\r
+* description ... homepage: different data fields from 'profile' table in database\r
+* users: array with the users allowed to view this profile (empty if is_default=true)\r
+\r
+\r
 ---\r
 ## Not Implemented API calls\r
 The following API calls are implemented in GNU Social but not in Friendica: (incomplete)\r