2021-05-22 13:21:18 +02:00
|
|
|
{generate_api_title(/events:get)}
|
2018-01-04 00:07:26 +01:00
|
|
|
|
2020-04-28 20:00:46 +02:00
|
|
|
{generate_api_description(/events:get)}
|
2018-01-04 00:07:26 +01:00
|
|
|
|
|
|
|
## Usage examples
|
|
|
|
|
2018-09-17 16:27:32 +02:00
|
|
|
{start_tabs}
|
|
|
|
{tab|python}
|
2018-01-04 00:07:26 +01:00
|
|
|
|
|
|
|
```
|
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
import sys
|
|
|
|
import zulip
|
|
|
|
|
2019-01-07 14:27:58 +01:00
|
|
|
# Pass the path to your zuliprc file here.
|
|
|
|
client = zulip.Client(config_file="~/zuliprc")
|
2018-01-04 00:07:26 +01:00
|
|
|
|
|
|
|
# If you already have a queue registered and thus, have a queue_id
|
|
|
|
# on hand, you may use client.get_events() and pass in the above
|
2020-06-18 15:35:25 +02:00
|
|
|
# parameters, like so:
|
2018-01-04 00:07:26 +01:00
|
|
|
print(client.get_events(
|
|
|
|
queue_id="1515010080:4",
|
|
|
|
last_event_id=-1
|
|
|
|
))
|
|
|
|
```
|
|
|
|
|
|
|
|
`call_on_each_message` and `call_on_each_event` will automatically register
|
|
|
|
a queue for you.
|
|
|
|
|
2020-06-29 18:14:47 +02:00
|
|
|
{generate_code_example(javascript)|/events:get|example}
|
2018-01-04 00:07:26 +01:00
|
|
|
|
2018-09-17 16:27:32 +02:00
|
|
|
{tab|curl}
|
|
|
|
|
2021-06-21 12:58:23 +02:00
|
|
|
{generate_code_example(curl)|/events:get|example}
|
2018-01-04 00:07:26 +01:00
|
|
|
|
2018-09-17 16:27:32 +02:00
|
|
|
{end_tabs}
|
2018-01-04 00:07:26 +01:00
|
|
|
|
2020-06-18 15:35:25 +02:00
|
|
|
## Parameters
|
2018-01-20 22:03:05 +01:00
|
|
|
|
2018-06-21 01:05:11 +02:00
|
|
|
{generate_api_arguments_table|zulip.yaml|/events:get}
|
2018-01-20 22:03:05 +01:00
|
|
|
|
2018-01-04 00:07:26 +01:00
|
|
|
## Response
|
|
|
|
|
2020-05-20 11:57:57 +02:00
|
|
|
{generate_return_values_table|zulip.yaml|/events:get}
|
2018-01-04 00:07:26 +01:00
|
|
|
|
2021-06-21 21:39:57 +02:00
|
|
|
{generate_response_description(/events:get)}
|
|
|
|
|
2018-01-04 00:07:26 +01:00
|
|
|
#### Example response
|
|
|
|
|
2018-06-21 01:05:11 +02:00
|
|
|
{generate_code_example|/events:get|fixture(200)}
|
2018-06-01 21:41:50 +02:00
|
|
|
|
2018-06-21 01:05:11 +02:00
|
|
|
{generate_code_example|/events:get|fixture(400)}
|