summaryrefslogtreecommitdiff
path: root/docs/api
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-10-16 13:27:43 +0200
committerLibravatar GitHub <noreply@github.com>2021-10-16 13:27:43 +0200
commit15621f5324b4613d83efb94711c97eeaa83da2b3 (patch)
treeb86c837dec89f5c74a7127f1bcd8e224bf6dd8a6 /docs/api
parentUser password change (#280) (diff)
downloadgotosocial-15621f5324b4613d83efb94711c97eeaa83da2b3.tar.xz
Follow request improvements (#282)
* tiny doc update * add rejectfollowrequest to db * add follow request reject to processor * add reject handler * tidy up follow request api * tidy up federation call * regenerate swagger docs * api endpoint tests * processor test * add reject federatingdb handler * start writing reject tests * test reject follow request * go fmt * increase sleep for slow test setups * more relaxed time.sleep
Diffstat (limited to 'docs/api')
-rw-r--r--docs/api/swagger.yaml109
1 files changed, 109 insertions, 0 deletions
diff --git a/docs/api/swagger.yaml b/docs/api/swagger.yaml
index 72c543a3a..ae258bb46 100644
--- a/docs/api/swagger.yaml
+++ b/docs/api/swagger.yaml
@@ -2450,6 +2450,115 @@ paths:
summary: Get an array of accounts that requesting account has blocked.
tags:
- blocks
+ /api/v1/follow_requests:
+ get:
+ description: |-
+ The next and previous queries can be parsed from the returned Link header.
+ Example:
+
+ ```
+ <https://example.org/api/v1/follow_requests?limit=80&max_id=01FC0SKA48HNSVR6YKZCQGS2V8>; rel="next", <https://example.org/api/v1/follow_requests?limit=80&min_id=01FC0SKW5JK2Q4EVAV2B462YY0>; rel="prev"
+ ````
+ operationId: getFollowRequests
+ parameters:
+ - default: 40
+ description: Number of accounts to return.
+ in: query
+ name: limit
+ type: integer
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: ""
+ headers:
+ Link:
+ description: Links to the next and previous queries.
+ type: string
+ schema:
+ items:
+ $ref: '#/definitions/account'
+ type: array
+ "400":
+ description: bad request
+ "401":
+ description: unauthorized
+ "403":
+ description: forbidden
+ "404":
+ description: not found
+ security:
+ - OAuth2 Bearer:
+ - read:follows
+ summary: Get an array of accounts that have requested to follow you.
+ tags:
+ - follow_requests
+ /api/v1/follow_requests/{account_id}/authorize:
+ post:
+ description: Accept a follow request and put the requesting account in your
+ 'followers' list.
+ operationId: authorizeFollowRequest
+ parameters:
+ - description: ID of the account requesting to follow you.
+ in: path
+ name: account_id
+ required: true
+ type: string
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: Your relationship to this account.
+ schema:
+ $ref: '#/definitions/accountRelationship'
+ "400":
+ description: bad request
+ "401":
+ description: unauthorized
+ "403":
+ description: forbidden
+ "404":
+ description: not found
+ "500":
+ description: internal server error
+ security:
+ - OAuth2 Bearer:
+ - write:follows
+ summary: Accept/authorize follow request from the given account ID.
+ tags:
+ - follow_requests
+ /api/v1/follow_requests/{account_id}/reject:
+ post:
+ operationId: rejectFollowRequest
+ parameters:
+ - description: ID of the account requesting to follow you.
+ in: path
+ name: account_id
+ required: true
+ type: string
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: Your relationship to this account.
+ schema:
+ $ref: '#/definitions/accountRelationship'
+ "400":
+ description: bad request
+ "401":
+ description: unauthorized
+ "403":
+ description: forbidden
+ "404":
+ description: not found
+ "500":
+ description: internal server error
+ security:
+ - OAuth2 Bearer:
+ - write:follows
+ summary: Reject/deny follow request from the given account ID.
+ tags:
+ - follow_requests
/api/v1/instance:
get:
description: |-