api docs: Document POST /mark_(all|stream|topic)_as_read.

This commit is contained in:
Yago González
2018-08-11 13:38:55 +02:00
committed by Tim Abbott
parent 5272ac8c39
commit 7a4103eee6
4 changed files with 244 additions and 0 deletions

View File

@@ -209,6 +209,68 @@ paths:
"msg": "Invalid stream name 'nonexistent'",
"result": "error"
}
/mark_all_as_read:
post:
description: Mark all the user's unread messages as read. This is often
called "bankruptcy" in Zulip.
security:
- basicAuth: []
responses:
'200':
description: Success.
content:
application/json:
schema:
$ref: '#/components/schemas/JsonSuccess'
/mark_stream_as_read:
post:
description: Mark all the unread messages in a stream as read.
parameters:
- name: stream_id
in: query
description: The ID of the stream whose messages should be marked as
read.
schema:
type: integer
example: 42
required: true
security:
- basicAuth: []
responses:
'200':
description: Success.
content:
application/json:
schema:
$ref: '#/components/schemas/JsonSuccess'
/mark_topic_as_read:
post:
description: Mark all the unread messages in a topic as read.
parameters:
- name: stream_id
in: query
description: The ID of the stream that contains the topic.
schema:
type: integer
example: 42
required: true
- name: topic_name
in: query
description: The name of the topic whose messages should be marked as
read.
schema:
type: string
example: new coffee machine
required: true
security:
- basicAuth: []
responses:
'200':
description: Success.
content:
application/json:
schema:
$ref: '#/components/schemas/JsonSuccess'
/messages:
get:
description: Fetch messages that match a specific narrow.