summaryrefslogtreecommitdiff
path: root/docs/api
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-02-25 13:16:30 +0100
committerLibravatar GitHub <noreply@github.com>2023-02-25 12:16:30 +0000
commitc27b4d7ed02cdabac00c3ddedb8201b74f745ec6 (patch)
treed80f621241fd67a4e5de2d21a8c24776552175f5 /docs/api
parent[chore] Update gin to v1.9.0 (#1553) (diff)
downloadgotosocial-c27b4d7ed02cdabac00c3ddedb8201b74f745ec6.tar.xz
[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
Diffstat (limited to 'docs/api')
-rw-r--r--docs/api/swagger.yaml73
1 files changed, 73 insertions, 0 deletions
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