diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2023-04-14 13:33:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-14 13:33:01 +0200 |
commit | 3deb22df12fea0b201ca6ebb49b49461c01a00b1 (patch) | |
tree | ad489d927ed1ef05f02a73c89cd2e7e4d8623284 /docs | |
parent | 86bfb5c778abc6c4170dcf4244125b6bdfd8944d (diff) | |
parent | 40bc97211ba4220fa3c2fa1616ba4a70954680c0 (diff) |
Merge pull request #9308 from nextcloud/bugfix/noid/split-avatar-docs-to-own-file
fix(docs): Split avatar docs because it has a different base API version
Diffstat (limited to 'docs')
-rw-r--r-- | docs/avatar.md | 61 | ||||
-rw-r--r-- | docs/conversation.md | 62 | ||||
-rw-r--r-- | docs/index.md | 1 |
3 files changed, 62 insertions, 62 deletions
diff --git a/docs/avatar.md b/docs/avatar.md new file mode 100644 index 000000000..bfeb9e63d --- /dev/null +++ b/docs/avatar.md @@ -0,0 +1,61 @@ +# Conversation avatar API + +* API v1: Base endpoint `/ocs/v2.php/apps/spreed/api/v1`: since Nextcloud 27 + +## Set conversations avatar + +* Required capability: `avatar` +* Method: `POST` +* Endpoint: `/room/{token}/avatar` +* Data: + +| field | type | Description | +|--------|--------|-------------------------------------------------------------------------------------------------------------------------------------| +| `file` | string | Blob of image in a multipart/form-data request. Only accept images with mimetype equal to PNG or JPEG and need to be squared image. | + +* Response: + - Status code: + + `200 OK` + + `400 Bad Request` When: is one-to-one, no image, file is too big, invalid mimetype or resource, isn't square, unknown error + + `403 Forbidden` When the current user is not a moderator, owner or guest moderator + + `404 Not Found` When the conversation could not be found for the participant + + - Data: See array definition in `Get user´s conversations` + +## Delete conversations avatar + +* Required capability: `avatar` +* Method: `DELETE` +* Endpoint: `/room/{token}/avatar` + +* Response: + - Status code: + + `200 OK` + + `403 Forbidden` When the current user is not a moderator, owner or guest moderator + + `404 Not Found` When the conversation could not be found for the participant + + - Data: See array definition in `Get user´s conversations` + +## Get conversations avatar (binary) + +* Required capability: `avatar` +* Method: `GET` +* Endpoint: `/room/{token}/avatar` + +* Response: + - Status code: + + `200 OK` + + `404 Not Found` When the conversation could not be found for the participant + - Body: the image file + +## Get dark mode conversations avatar (binary) + +* Required capability: `avatar` +* Method: `GET` +* Endpoint: `/room/{token}/avatar/dark` + +* Response: + - Status code: + + `200 OK` + + `404 Not Found` When the conversation could not be found for the participant + - Body: the image file diff --git a/docs/conversation.md b/docs/conversation.md index 98cad84f8..c352f985c 100644 --- a/docs/conversation.md +++ b/docs/conversation.md @@ -423,65 +423,3 @@ Get all (for moderators and in case of "free selection") or the assigned breakou + `400 Bad Request` When the conversation is a breakout room + `403 Forbidden` When the current user is not a moderator/owner or the conversation is not a public conversation + `404 Not Found` When the conversation could not be found for the participant - -## Set conversations avatar - -* ⚠️ Preview - Might be modified before the capability is added -* Required capability: `avatar` -* Method: `POST` -* Endpoint: `/room/{token}/avatar` -* Data: - -| field | type | Description | -|--------|--------|-------------------------------------------------------------------------------------------------------------------------------------| -| `file` | string | Blob of image in a multipart/form-data request. Only accept images with mimetype equal to PNG or JPEG and need to be squared image. | - -* Response: - - Status code: - + `200 OK` - + `400 Bad Request` When: is one-to-one, no image, file is too big, invalid mimetype or resource, isn't square, unknown error - + `403 Forbidden` When the current user is not a moderator, owner or guest moderator - + `404 Not Found` When the conversation could not be found for the participant - - - Data: See array definition in `Get user´s conversations` - -## Delete conversations avatar - -* ⚠️ Preview - Might be modified before the capability is added -* Required capability: `avatar` -* Method: `DELETE` -* Endpoint: `/room/{token}/avatar` - -* Response: - - Status code: - + `200 OK` - + `403 Forbidden` When the current user is not a moderator, owner or guest moderator - + `404 Not Found` When the conversation could not be found for the participant - - - Data: See array definition in `Get user´s conversations` - -## Get conversations avatar (binary) - -* ⚠️ Preview - Might be modified before the capability is added -* Required capability: `avatar` -* Method: `GET` -* Endpoint: `/room/{token}/avatar` - -* Response: - - Status code: - + `200 OK` - + `404 Not Found` When the conversation could not be found for the participant - - Body: the image file - -## Get dark mode conversations avatar (binary) - -* ⚠️ Preview - Might be modified before the capability is added -* Required capability: `avatar` -* Method: `GET` -* Endpoint: `/room/{token}/avatar/dark` - -* Response: - - Status code: - + `200 OK` - + `404 Not Found` When the conversation could not be found for the participant - - Body: the image file diff --git a/docs/index.md b/docs/index.md index bd433aa59..a2bc0846d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -13,6 +13,7 @@ * [Constants](constants.md) * [Capabilities](capabilities.md) * [Conversation API](conversation.md) +* [Conversation avatar API](avatar.md) * [Participant API](participant.md) * [Call API](call.md) * [Call recording API](recording.md) |