mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
api_docs: Add "event_types" common component.
To facilitate re-use of the same parameters in other paths. this commit store the content of the parameter "event_types" in components.
This commit is contained in:
committed by
Tim Abbott
parent
fbc8325d0e
commit
f2c9a9a832
@@ -2346,23 +2346,7 @@ paths:
|
||||
type: boolean
|
||||
default: false
|
||||
example: true
|
||||
- name: event_types
|
||||
in: query
|
||||
description: "A JSON-encoded array indicating which types of events
|
||||
you're interested in. Values that you might find useful include:
|
||||
<br/> <br/>
|
||||
* **message** (messages), <br/>
|
||||
* **subscription** (changes in your subscriptions), <br/>
|
||||
* **realm_user** (changes in the list of users in your realm)
|
||||
<br/> <br/>
|
||||
If you do not specify this argument, you will receive all events,
|
||||
and have to filter out the events not relevant to your client in
|
||||
your client code. For most applications, one is only interested in
|
||||
messages, so one specifies: `event_types=['message']`"
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
- $ref: '#/components/parameters/Event_types'
|
||||
example: ['message']
|
||||
- name: all_public_streams
|
||||
in: query
|
||||
@@ -3240,30 +3224,8 @@ paths:
|
||||
type: string
|
||||
example: narrow=['stream', 'Denmark']
|
||||
required: false
|
||||
- name: event_types
|
||||
in: query
|
||||
description: |
|
||||
A JSON-encoded array indicating which types of events you're
|
||||
interested in. Values that you might find useful include:
|
||||
|
||||
* **message** (messages)
|
||||
* **subscription** (changes in your subscriptions)
|
||||
* **realm_user** (changes to users in the organization and
|
||||
their properties, such as their name).
|
||||
|
||||
If you do not specify this argument, you will receive all
|
||||
events, and have to filter out the events not relevant to
|
||||
your client in your client code. For most applications, one
|
||||
is only interested in messages, so one specifies:
|
||||
`event_types=['message']`
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
default:
|
||||
- $ref: '#/components/parameters/Event_types'
|
||||
example: event_types=['message']
|
||||
required: false
|
||||
default: null
|
||||
security:
|
||||
- basicAuth: []
|
||||
/rest-error-handling:
|
||||
@@ -3539,3 +3501,32 @@ components:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/JsonSuccess'
|
||||
|
||||
####################
|
||||
# Shared parameters
|
||||
####################
|
||||
parameters:
|
||||
Event_types:
|
||||
name: event_types
|
||||
in: query
|
||||
description: |
|
||||
A JSON-encoded array indicating which types of events you're
|
||||
interested in. Values that you might find useful include:
|
||||
|
||||
* **message** (messages)
|
||||
* **subscription** (changes in your subscriptions)
|
||||
* **realm_user** (changes to users in the organization and
|
||||
their properties, such as their name).
|
||||
|
||||
If you do not specify this argument, you will receive all
|
||||
events, and have to filter out the events not relevant to
|
||||
your client in your client code. For most applications, one
|
||||
is only interested in messages, so one specifies:
|
||||
`event_types=['message']`
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
default:
|
||||
required: false
|
||||
default: null
|
||||
|
||||
Reference in New Issue
Block a user