diff options
Diffstat (limited to 'docs/api')
-rw-r--r-- | docs/api/swagger.yaml | 46 |
1 files changed, 43 insertions, 3 deletions
diff --git a/docs/api/swagger.yaml b/docs/api/swagger.yaml index 3db6acb99..54d318111 100644 --- a/docs/api/swagger.yaml +++ b/docs/api/swagger.yaml @@ -8826,11 +8826,27 @@ paths: post: consumes: - application/json - - application/xml - application/x-www-form-urlencoded description: |- The parameters can also be given in the body of the request, as JSON, if the content-type is set to 'application/json'. - The parameters can also be given in the body of the request, as XML, if the content-type is set to 'application/xml'. + + The 'interaction_policy' field can be used to set an interaction policy for this status. + + If submitting using form data, use the following pattern to set an interaction policy: + + `interaction_policy[INTERACTION_TYPE][CONDITION][INDEX]=Value` + + For example: `interaction_policy[can_reply][always][0]=author` + + Using `curl` this might look something like: + + `curl -F 'interaction_policy[can_reply][always][0]=author' -F 'interaction_policy[can_reply][always][1]=followers' [... other form fields ...]` + + The JSON equivalent would be: + + `curl -H 'Content-Type: application/json' -d '{"interaction_policy":{"can_reply":{"always":["author","followers"]}} [... other json fields ...]}'` + + The server will perform some normalization on the submitted policy so that you can't submit something totally invalid. operationId: statusCreate parameters: - description: |- @@ -8944,6 +8960,30 @@ paths: name: content_type type: string x-go-name: ContentType + - description: Nth entry for interaction_policy.can_favourite.always. + in: formData + name: interaction_policy[can_favourite][always][0] + type: string + - description: Nth entry for interaction_policy.can_favourite.with_approval. + in: formData + name: interaction_policy[can_favourite][with_approval][0] + type: string + - description: Nth entry for interaction_policy.can_reply.always. + in: formData + name: interaction_policy[can_reply][always][0] + type: string + - description: Nth entry for interaction_policy.can_reply.with_approval. + in: formData + name: interaction_policy[can_reply][with_approval][0] + type: string + - description: Nth entry for interaction_policy.can_reblog.always. + in: formData + name: interaction_policy[can_reblog][always][0] + type: string + - description: Nth entry for interaction_policy.can_reblog.with_approval. + in: formData + name: interaction_policy[can_reblog][with_approval][0] + type: string produces: - application/json responses: @@ -8966,7 +9006,7 @@ paths: security: - OAuth2 Bearer: - write:statuses - summary: Create a new status. + summary: Create a new status using the given form field parameters. tags: - statuses /api/v1/statuses/{id}: |