From: Sadposter Date: Wed, 10 Apr 2019 09:44:54 +0000 (+0100) Subject: Merge branch 'develop' into feature/user-status-subscriptions X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=be8350baa2f8c9cf9be3f53ee4a0041dada1386f;p=akkoma Merge branch 'develop' into feature/user-status-subscriptions --- be8350baa2f8c9cf9be3f53ee4a0041dada1386f diff --cc docs/api/pleroma_api.md index 75569e092,a1ea41fe3..dbe250300 --- a/docs/api/pleroma_api.md +++ b/docs/api/pleroma_api.md @@@ -114,53 -136,15 +136,64 @@@ See [Admin-API](Admin-API.md * Method `POST` * Authentication: required * Params: - * `id`: notifications's id + * `id`: notification's id * Response: JSON. Returns `{"status": "success"}` if the reading was successful, otherwise returns `{"error": "error_msg"}` + +## `/api/v1/pleroma/accounts/:id/subscribe` +### Subscribe to receive notifications for all statuses posted by a user +* Method `POST` +* Authentication: required +* Params: + * `id`: account id to subscribe to +* Response: JSON, returns a mastodon relationship object on success, otherwise returns `{"error": "error_msg"}` +* Example response: +```json +{ + "id": "abcdefg", + "following": true, + "followed_by": false, + "blocking": false, + "muting": false, + "muting_notifications": false, + "subscribing": true, + "requested": false, + "domain_blocking": false, + "showing_reblogs": true, + "endorsed": false +} +``` + +## `/api/v1/pleroma/accounts/:id/unsubscribe` +### Unsubscribe to stop receiving notifications from user statuses +* Method `POST` +* Authentication: required +* Params: + * `id`: account id to unsubscribe from +* Response: JSON, returns a mastodon relationship object on success, otherwise returns `{"error": "error_msg"}` +* Example response: +```json +{ + "id": "abcdefg", + "following": true, + "followed_by": false, + "blocking": false, + "muting": false, + "muting_notifications": false, + "subscribing": false, + "requested": false, + "domain_blocking": false, + "showing_reblogs": true, + "endorsed": false +} +``` ++ + ## `/api/pleroma/notification_settings` + ### Updates user notification settings + * Method `PUT` + * Authentication: required + * Params: + * `followers`: BOOLEAN field, receives notifications from followers + * `follows`: BOOLEAN field, receives notifications from people the user follows + * `remote`: BOOLEAN field, receives notifications from people on remote instances + * `local`: BOOLEAN field, receives notifications from people on the local instance + * Response: JSON. Returns `{"status": "success"}` if the update was successful, otherwise returns `{"error": "error_msg"}`