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
'users' => null);\r
return $profile;\r
}\r
- if ($type == "xml") {\r
- $xml_activities = array();\r
- foreach ($activities as $k => $v) {\r
- // change xml element from "like" to "friendica:like"\r
- $xml_activities["friendica:".$k] = $v;\r
- // add user data into xml output\r
- $k_user = 0;\r
- foreach ($v as $user)\r
- $xml_activities["friendica:".$k][$k_user++.":user"] = $user;\r
- }\r
- $activities = $xml_activities;\r
- }\r
-\r
- return $activities;\r
}\r
\r
/**\r
}\r
\r
// return settings, authenticated user and profiles data\r
- $result = array('multi_profiles' => $multi_profiles,\r
+ $result = array('multi_profiles' => $multi_profiles ? true : false,\r
'global_dir' => $directory,\r
'friendica_owner' => api_get_user($a, intval(api_user())),\r
'profiles' => $profiles);\r