X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=doc%2FAPI-Friendica.md;h=af47638d2ed4af02a102ed6e48dc8f9cff84d333;hb=6b7babd58f5ece97969e81d2ad21df1a60725bef;hp=2e33a887da170d96beefdd28396f4d2c010ba748;hpb=e1ba53fec3391e40565e0c7c88a23cb6dae3dc4e;p=friendica.git diff --git a/doc/API-Friendica.md b/doc/API-Friendica.md index 2e33a887da..af47638d2e 100644 --- a/doc/API-Friendica.md +++ b/doc/API-Friendica.md @@ -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. @@ -435,7 +444,7 @@ json: ```json { - "id": "photo id" + "id": "photo id", "created": "date(YYYY-MM-DD HH:MM:SS)", "edited": "date(YYYY-MM-DD HH:MM:SS)", "title": "photo title", @@ -447,7 +456,7 @@ json: "width": "number", "profile": "1 if is profile photo", "link": { - "": "url to image" + "": "url to image", ... }, // if 'scale' is set @@ -489,11 +498,11 @@ json: ```json [ { - id: "resource_id", - album: "album name", - filename: "original file name", - type: "image mime type", - thumb: "url to thumb sized image" + "id": "resource_id", + "album": "album name", + "filename": "original file name", + "type": "image mime type", + "thumb": "url to thumb sized image" }, ... ] @@ -645,17 +654,12 @@ 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 On success: Array of: -* `multi_profiles`: true if user has activated multi_profiles * `global_dir`: URL of the global directory set in server settings * `friendica_owner`: user data of the authenticated user * `profiles`: array of the profile data @@ -665,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