From 4f79bbbc31c10c1d55c9fee4002f36ef16b95dbf Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Fri, 2 Oct 2020 21:00:50 +0400 Subject: Add local-only statuses --- docs/API/differences_in_mastoapi_responses.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs/API') diff --git a/docs/API/differences_in_mastoapi_responses.md b/docs/API/differences_in_mastoapi_responses.md index 38865dc68..1e932d908 100644 --- a/docs/API/differences_in_mastoapi_responses.md +++ b/docs/API/differences_in_mastoapi_responses.md @@ -28,6 +28,7 @@ Has these additional fields under the `pleroma` object: - `thread_muted`: true if the thread the post belongs to is muted - `emoji_reactions`: A list with emoji / reaction maps. The format is `{name: "☕", count: 1, me: true}`. Contains no information about the reacting users, for that use the `/statuses/:id/reactions` endpoint. - `parent_visible`: If the parent of this post is visible to the user or not. +- `local_only`: true for local-only, non-federated posts. ## Media Attachments @@ -154,6 +155,7 @@ Additional parameters can be added to the JSON body/Form data: - `visibility`: string, besides standard MastoAPI values (`direct`, `private`, `unlisted` or `public`) it can be used to address a List by setting it to `list:LIST_ID`. - `expires_in`: The number of seconds the posted activity should expire in. When a posted activity expires it will be deleted from the server, and a delete request for it will be federated. This needs to be longer than an hour. - `in_reply_to_conversation_id`: Will reply to a given conversation, addressing only the people who are part of the recipient set of that conversation. Sets the visibility to `direct`. +- `local_only`: boolean, if set to `true` the post won't be federated. ## GET `/api/v1/statuses` -- cgit v1.2.3 From 75d131ba1860dc75486819ca93310292244ef92e Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Thu, 29 Oct 2020 15:55:30 +0400 Subject: Add documentation and update CHANGELOG --- docs/API/admin_api.md | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) (limited to 'docs/API') diff --git a/docs/API/admin_api.md b/docs/API/admin_api.md index 7bf13daef..ca8c98728 100644 --- a/docs/API/admin_api.md +++ b/docs/API/admin_api.md @@ -1497,3 +1497,61 @@ Returns the content of the document "url": "https://example.com/instance/panel.html" } ``` + +## `GET /api/pleroma/admin/frontends + +### List available frontends + +- Response: + +```json +[ + { + "build_url": "https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build", + "git": "https://git.pleroma.social/pleroma/fedi-fe", + "installed": true, + "name": "fedi-fe", + "ref": "master" + }, + { + "build_url": "https://git.pleroma.social/lambadalambda/kenoma/-/jobs/artifacts/${ref}/download?job=build", + "git": "https://git.pleroma.social/lambadalambda/kenoma", + "installed": false, + "name": "kenoma", + "ref": "master" + } +] +``` + + +## `POST /api/pleroma/admin/frontends + +### Install a frontend + +- Params: + - `name`: frontend name, required + - `ref`: frontend ref + - `file`: path to a frontend zip file + - `build_url`: build URL + - `build_dir`: build directory + +- Response: + +```json +[ + { + "build_url": "https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build", + "git": "https://git.pleroma.social/pleroma/fedi-fe", + "installed": true, + "name": "fedi-fe", + "ref": "master" + }, + { + "build_url": "https://git.pleroma.social/lambadalambda/kenoma/-/jobs/artifacts/${ref}/download?job=build", + "git": "https://git.pleroma.social/lambadalambda/kenoma", + "installed": false, + "name": "kenoma", + "ref": "master" + } +] +``` -- cgit v1.2.3 From 0118ccb53cd1f33cb91b28fc7f5b6378f2424ffc Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Wed, 11 Nov 2020 18:47:57 +0400 Subject: Add `local` visibility --- docs/API/differences_in_mastoapi_responses.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'docs/API') diff --git a/docs/API/differences_in_mastoapi_responses.md b/docs/API/differences_in_mastoapi_responses.md index 1e932d908..c6d822bfc 100644 --- a/docs/API/differences_in_mastoapi_responses.md +++ b/docs/API/differences_in_mastoapi_responses.md @@ -14,7 +14,7 @@ Adding the parameter `reply_visibility` to the public and home timelines queries ## Statuses -- `visibility`: has an additional possible value `list` +- `visibility`: has additional possible values `list` and `local` (for local-only statuses) Has these additional fields under the `pleroma` object: @@ -28,7 +28,6 @@ Has these additional fields under the `pleroma` object: - `thread_muted`: true if the thread the post belongs to is muted - `emoji_reactions`: A list with emoji / reaction maps. The format is `{name: "☕", count: 1, me: true}`. Contains no information about the reacting users, for that use the `/statuses/:id/reactions` endpoint. - `parent_visible`: If the parent of this post is visible to the user or not. -- `local_only`: true for local-only, non-federated posts. ## Media Attachments @@ -152,10 +151,9 @@ Additional parameters can be added to the JSON body/Form data: - `preview`: boolean, if set to `true` the post won't be actually posted, but the status entitiy would still be rendered back. This could be useful for previewing rich text/custom emoji, for example. - `content_type`: string, contain the MIME type of the status, it is transformed into HTML by the backend. You can get the list of the supported MIME types with the nodeinfo endpoint. - `to`: A list of nicknames (like `lain@soykaf.club` or `lain` on the local server) that will be used to determine who is going to be addressed by this post. Using this will disable the implicit addressing by mentioned names in the `status` body, only the people in the `to` list will be addressed. The normal rules for for post visibility are not affected by this and will still apply. -- `visibility`: string, besides standard MastoAPI values (`direct`, `private`, `unlisted` or `public`) it can be used to address a List by setting it to `list:LIST_ID`. +- `visibility`: string, besides standard MastoAPI values (`direct`, `private`, `unlisted`, `local` or `public`) it can be used to address a List by setting it to `list:LIST_ID`. - `expires_in`: The number of seconds the posted activity should expire in. When a posted activity expires it will be deleted from the server, and a delete request for it will be federated. This needs to be longer than an hour. - `in_reply_to_conversation_id`: Will reply to a given conversation, addressing only the people who are part of the recipient set of that conversation. Sets the visibility to `direct`. -- `local_only`: boolean, if set to `true` the post won't be federated. ## GET `/api/v1/statuses` -- cgit v1.2.3 From d26a4493960cc9d99183dfcd18464040213ac91e Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Wed, 11 Nov 2020 20:39:57 +0400 Subject: Change endpoint path --- docs/API/admin_api.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'docs/API') diff --git a/docs/API/admin_api.md b/docs/API/admin_api.md index cbf4b9134..e18d5e513 100644 --- a/docs/API/admin_api.md +++ b/docs/API/admin_api.md @@ -1525,8 +1525,7 @@ Returns the content of the document ] ``` - -## `POST /api/pleroma/admin/frontends +## `POST /api/pleroma/admin/frontends/install ### Install a frontend -- cgit v1.2.3 From 81145ecdf52c74147c842ab6c099abf5e1ad1eff Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Wed, 11 Nov 2020 20:42:05 +0400 Subject: Fix markdown --- docs/API/admin_api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/API') diff --git a/docs/API/admin_api.md b/docs/API/admin_api.md index e18d5e513..4c72d3d61 100644 --- a/docs/API/admin_api.md +++ b/docs/API/admin_api.md @@ -1525,7 +1525,7 @@ Returns the content of the document ] ``` -## `POST /api/pleroma/admin/frontends/install +## `POST /api/pleroma/admin/frontends/install` ### Install a frontend -- cgit v1.2.3 From e6d4d62f8547859d3c322621f001505ffe814503 Mon Sep 17 00:00:00 2001 From: lain Date: Tue, 17 Nov 2020 16:44:20 +0100 Subject: Docs: Add info about frontend install error response --- docs/API/admin_api.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docs/API') diff --git a/docs/API/admin_api.md b/docs/API/admin_api.md index 4c72d3d61..19ac6a65f 100644 --- a/docs/API/admin_api.md +++ b/docs/API/admin_api.md @@ -1556,3 +1556,9 @@ Returns the content of the document } ] ``` + +```json +{ + "error": "Could not install frontend" +} +``` -- cgit v1.2.3 From 1433d3c59c2053244b9f570516a80e949f5fb10d Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 17 Nov 2020 19:05:36 +0000 Subject: Document the API extensions for push subscriptions --- docs/API/differences_in_mastoapi_responses.md | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'docs/API') diff --git a/docs/API/differences_in_mastoapi_responses.md b/docs/API/differences_in_mastoapi_responses.md index 17999da55..4f0fe86e5 100644 --- a/docs/API/differences_in_mastoapi_responses.md +++ b/docs/API/differences_in_mastoapi_responses.md @@ -261,6 +261,16 @@ Has theses additional parameters (which are the same as in Pleroma-API): - `pleroma.metadata.post_formats`: A list of the allowed post format types - `vapid_public_key`: The public key needed for push messages +## Push Subscription + +`POST /api/v1/push/subscription` +`PUT /api/v1/push/subscription` + +Permits these additional alert types: + +- pleroma:chat_mention +- pleroma:emoji_reaction + ## Markers Has these additional fields under the `pleroma` object: -- cgit v1.2.3 From 80e21903d4abd3cd87694c3faaeff3a6afd2c8dc Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 17 Nov 2020 19:06:30 +0000 Subject: Spelling --- docs/API/differences_in_mastoapi_responses.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/API') diff --git a/docs/API/differences_in_mastoapi_responses.md b/docs/API/differences_in_mastoapi_responses.md index 4f0fe86e5..843496482 100644 --- a/docs/API/differences_in_mastoapi_responses.md +++ b/docs/API/differences_in_mastoapi_responses.md @@ -233,7 +233,7 @@ Post here request with `grant_type=refresh_token` to obtain new access token. Re `POST /api/v1/accounts` -Has theses additional parameters (which are the same as in Pleroma-API): +Has these additional parameters (which are the same as in Pleroma-API): - `fullname`: optional - `bio`: optional -- cgit v1.2.3 From e164c37139c4365d7d46a2a990b364ad26dfdbf7 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Thu, 19 Nov 2020 19:30:02 +0300 Subject: [#2301] Proper handling of `User.is_discoverable`: users appear in in-service search but are hidden from external services like search bots. --- docs/API/admin_api.md | 2 +- docs/API/differences_in_mastoapi_responses.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/API') diff --git a/docs/API/admin_api.md b/docs/API/admin_api.md index 19ac6a65f..266f8cef8 100644 --- a/docs/API/admin_api.md +++ b/docs/API/admin_api.md @@ -554,7 +554,7 @@ Response: * `show_role` * `skip_thread_containment` * `fields` - * `discoverable` + * `is_discoverable` * `actor_type` * Responses: diff --git a/docs/API/differences_in_mastoapi_responses.md b/docs/API/differences_in_mastoapi_responses.md index 843496482..6b0ad85d1 100644 --- a/docs/API/differences_in_mastoapi_responses.md +++ b/docs/API/differences_in_mastoapi_responses.md @@ -84,7 +84,7 @@ Has these additional fields under the `pleroma` object: - `show_role`: boolean, nullable, true when the user wants his role (e.g admin, moderator) to be shown - `no_rich_text` - boolean, nullable, true when html tags are stripped from all statuses requested from the API -- `discoverable`: boolean, true when the user allows discovery of the account in search results and other services. +- `discoverable`: boolean, true when the user allows external services (search bots) etc. to index / list the account (regardless of this setting, user will still appear in regular search results) - `actor_type`: string, the type of this account. ## Conversations @@ -207,7 +207,7 @@ Additional parameters can be added to the JSON body/Form data: - `skip_thread_containment` - if true, skip filtering out broken threads - `allow_following_move` - if true, allows automatically follow moved following accounts - `pleroma_background_image` - sets the background image of the user. Can be set to "" (an empty string) to reset. -- `discoverable` - if true, discovery of this account in search results and other services is allowed. +- `discoverable` - if true, external services (search bots) etc. are allowed to index / list the account (regardless of this setting, user will still appear in regular search results). - `actor_type` - the type of this account. - `accepts_chat_messages` - if false, this account will reject all chat messages. -- cgit v1.2.3