]> git.mxchange.org Git - friendica.git/blobdiff - doc/API-Friendica.md
Merge pull request #11389 from nupplaphil/feat/http_client_arg
[friendica.git] / doc / API-Friendica.md
index 84467430aea878385a086a05ed06ccd8df24a96d..726accf62aef8ca3380cdc120b4ea4bd0bdbe815 100644 (file)
@@ -15,6 +15,15 @@ These endpoints uses the [Friendica API entities](help/API-Entities).
 
 ## Endpoints
 
+### GET api/friendica/events
+
+Returns a list of [Event](help/API-Entities#Event) entities for the current logged in user.
+
+#### Parameters
+
+- `since_id`: (optional) minimum event id for pagination
+- `count`: maximum number of items returned, default 20
+
 ### GET api/externalprofile/show
 
 Returns a [Contact](help/API-Entities#Contact) entity for the provided profile URL.
@@ -211,7 +220,7 @@ Deprecated Twitter sent direct message list endpoint. Returns [Private Messages]
 * `friendica_verbose`: "true" enables different error returns (default: "false")
 
 
-### POST/PUT api/direct_messages/new
+### POST api/direct_messages/new
 
 Deprecated Twitter direct message submission endpoint.
 
@@ -223,7 +232,7 @@ Deprecated Twitter direct message submission endpoint.
 * `replyto`: ID of the replied direct message
 * `title`: Title of the direct message
 
-### POST/DELETE api/direct_messages/destroy
+### POST api/direct_messages/destroy
 
 Deprecated Twitter direct message deletion endpoint.
 
@@ -304,7 +313,7 @@ Array of:
 * `gid`: id of the group
 * `user`: array of [Contacts](help/API-Entities#Contact)
 
-### POST/PUT api/friendica/group_create
+### POST api/friendica/group_create
 
 Create the group with the posted array of contacts as members.
 
@@ -357,7 +366,7 @@ Array of:
 * `status`: "missing user" | "ok"
 * `wrong users`: array of users, which were not available in the contact table
 
-### POST/DELETE api/friendica/group_delete
+### POST api/friendica/group_delete
 
 Delete the specified group of contacts; API call need to include the correct gid AND name of the group to be deleted.
 
@@ -556,7 +565,7 @@ On error:
                        "unknown error - update photo entry in database failed",
                        "unknown error - this error on uploading or updating a photo should never happen"
 
-### DELETE api/friendica/photo/delete
+### POST api/friendica/photo/delete
 
 Deletes a single image with the specified id, is not reversible -> ensure that client is asking user for being sure to do this
 Sets item table entries for this photo to deleted = 1.
@@ -586,7 +595,7 @@ On error:
 
 ---
 
-### POST/DELETE api/friendica/photoalbum/delete
+### POST api/friendica/photoalbum/delete
 
 Deletes all images with the specified album name, is not reversible -> ensure that client is asking user for being sure to do this.
 
@@ -613,7 +622,7 @@ On error:
 * 400 BADREQUEST: "no albumname specified", "album not available"
 * 500 INTERNALSERVERERROR: "problem with deleting item occured", "unknown error - deleting from database failed"
 
-### POST/PUT api/friendica/photoalbum/update
+### POST api/friendica/photoalbum/update
 
 Changes the album name to album_new for all photos in album.
 
@@ -645,11 +654,7 @@ On error:
 
 ### GET api/friendica/profile/show
 
-Returns the [Profile](help/API-Entities#Profile) data of all profiles or a single profile of the authenticated user.
-
-#### Parameters
-
-* `profile_id` (optional): id of the profile to be returned. If omitted all profiles are returned by default.
+Returns the [Profile](help/API-Entities#Profile) data of the authenticated user.
 
 #### Return values
 
@@ -664,18 +669,26 @@ HTTP 403 Forbidden: when no authentication was provided
 HTTP 400 Bad Request: if given profile_id is not in the database or is not assigned to the authenticated user
 
 General description of profile data in API returns:
+- hide_friends: true if friends are hidden
+- profile_photo
+- profile_thumb
+- publish: true if published on the server's local directory
+- net_publish: true if published to global_dir
+- fullname
+- date_of_birth
+- description
+- xmpp
+- homepage
+- address
+- locality
+- region
+- postal_code
+- country
+- pub_keywords
+- custom_fields: list of public custom fields
 
 ---
 
-### GET api/friendica/remoteauth
-
-Similar as /redir, redirects to `url` after DFRN authentication.
-
-#### Parameters
-
-- `c_url`: url of remote contact to auth to
-- `url`: string, url to redirect after auth
-
 ## Deprecated endpoints
 
 - POST api/statuses/mediap