From c27b4d7ed02cdabac00c3ddedb8201b74f745ec6 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Sat, 25 Feb 2023 13:16:30 +0100 Subject: [feature] Client API endpoints + v. basic web view for pinned posts (#1547) * implement status pin client api + web handler * make test names + comments more descriptive * don't use separate table for status pins * remove unused add + remove checking * tidy up + add some more tests --- docs/api/swagger.yaml | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) (limited to 'docs/api') diff --git a/docs/api/swagger.yaml b/docs/api/swagger.yaml index 293c7a443..c9ab00b86 100644 --- a/docs/api/swagger.yaml +++ b/docs/api/swagger.yaml @@ -5096,6 +5096,45 @@ paths: summary: View accounts that have faved/starred/liked the target status. tags: - statuses + /api/v1/statuses/{id}/pin: + post: + description: |- + You can only pin original posts (not reblogs) that you authored yourself. + + Supported privacy levels for pinned posts are public, unlisted, and private/followers-only, + but only public posts will appear on the web version of your profile. + operationId: statusPin + parameters: + - description: Target status ID. + in: path + name: id + required: true + type: string + produces: + - application/json + responses: + "200": + description: The status. + schema: + $ref: '#/definitions/status' + "400": + description: bad request + "401": + description: unauthorized + "403": + description: forbidden + "404": + description: not found + "406": + description: not acceptable + "500": + description: internal server error + security: + - OAuth2 Bearer: + - write:accounts + summary: Pin a status to the top of your profile, and add it to your Featured ActivityPub collection. + tags: + - statuses /api/v1/statuses/{id}/reblog: post: description: |- @@ -5233,6 +5272,40 @@ paths: summary: Unstar/unlike/unfavourite the given status. tags: - statuses + /api/v1/statuses/{id}/unpin: + post: + operationId: statusUnpin + parameters: + - description: Target status ID. + in: path + name: id + required: true + type: string + produces: + - application/json + responses: + "200": + description: The status. + schema: + $ref: '#/definitions/status' + "400": + description: bad request + "401": + description: unauthorized + "403": + description: forbidden + "404": + description: not found + "406": + description: not acceptable + "500": + description: internal server error + security: + - OAuth2 Bearer: + - write:accounts + summary: Unpin one of your pinned statuses. + tags: + - statuses /api/v1/statuses/{id}/unreblog: post: operationId: statusUnreblog -- cgit v1.2.3