Files
zulip/templates/zerver/api/arguments.json
2018-08-02 15:54:41 -07:00

99 lines
4.6 KiB
JSON

{
"call_on_each_event": [
{
"argument": "narrow",
"description": "A JSON-encoded array of length 2 indicating the narrow for which you'd like to receive events for. For instance, to receive events for the stream `Denmark`, you would specify `narrow=['stream', 'Denmark']`. Another example is `narrow=['is', 'private']` for private messages. Default is `[]`.",
"required": false,
"example": "narrow=['stream', 'Denmark']"
},
{
"argument": "event_types",
"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']`",
"required": false,
"example": "event_types=['message']"
}
],
"delete-queue.md": [
{
"argument": "queue_id",
"description": "The ID of a queue that you registered via `POST /api/v1/register`(see [Register a queue](/api/register-queue) and [Get events from queue](/api/get-events-from-queue)).",
"required": true,
"example": "1375801870:2942"
}
],
"update-message.md": [
{
"argument": "message_id",
"description": "The ID of the message that you wish to edit/update.",
"required": true,
"example": "134"
},
{
"argument": "subject",
"description": "The topic of the message. Only required for a stream message. Defaults to `None`. Maximum length of 60 characters.",
"required": false,
"example": "Castle"
},
{
"argument": "content",
"description": "The content of the message. Maximum message size of 10000 bytes.",
"required": false,
"example": "Hello"
},
{
"argument": "propagate_mode",
"description": "In the case of a topic update, `propagate_mode` is a value specifying whether the topic of any other messages in the same conversation would be updated or not. Possible values include: <br/> <br/> * **change_one** (Default): Update the topic only of the message with the given `message_id`. <br/> * **change_all**: Update the topic of all messages with the same previous topic as the message with `message_id`. <br/> * **change_later**: Update the topic of the message with `message_id` *and* update the topic of the messages with the same previous topic after it.",
"required": false,
"example": "change_all"
}
],
"create-user.md": [
{
"argument": "email",
"description": "The email address of the new user.",
"required": true,
"example": "newbie@zulip.com"
},
{
"argument": "password",
"description": "The password of the new user.",
"required": true,
"example": "abdec@7982"
},
{
"argument": "full_name",
"description": "The full name of the new user.",
"required": true,
"example": "John Smith"
},
{
"argument": "short_name",
"description": "The short name of the new user.",
"required": true,
"example": "jsmith"
}
],
"remove-subscriptions.md": [
{
"argument": "subscriptions",
"description": "A list of stream names to unsubscribe from. This argument is called `streams` in our Python API.",
"required": true,
"example": "['Verona', 'Denmark']"
},
{
"argument": "principals",
"description": "A list of email addresses of the users that will be unsubscribed from the streams specified in the `subscriptions` argument. Default is `None`. If not provided, then the requesting user/bot is unsubscribed.",
"required": false,
"example": "['ZOE@zulip.com']"
}
],
"upload-file.md": [
{
"argument": "file",
"description": "File to be uploaded.",
"required": true,
"example": "See code examples above."
}
]
}