Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SW-2035 #31

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ def message_handler(notification: Notification) -> None:
bot.run_forever()
```

### Receive webhooks via HTTP API

This library receives incoming webhooks (messages, statuses) via HTTP API requests in a manner similar to the implementation of other Green API methods. The chronological order of the webhooks is guaranteed to follow the sequence in which they were received (FIFO). All incoming webhooks are stored in the queue and are expected to be received within 24 hours.

To obtain incoming webhooks, this library sequentially calls two methods: [ReceiveNotification](https://green-api.com/en/docs/api/receiving/technology-http-api/ReceiveNotification/) and [DeleteNotification](https://green-api.com/en/docs/api/receiving/technology-http-api/DeleteNotofication/). The `ReceiveNotification` method receives an incoming webhook, while the `DeleteNotification` method confirms the successful receipt and processing of the webhook. For more information about these methods, refer to the respective sections on [ReceiveNotification](https://green-api.com/en/docs/api/receiving/technology-http-api/ReceiveNotification/) and [DeleteNotification](https://green-api.com/en/docs/api/receiving/technology-http-api/DeleteNotofication/).

### How to filter incoming messages

Messages can be filtered by chat, sender, message type, and text. To filter chat, sender, and message type, you can use
Expand Down
6 changes: 6 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ def message_handler(notification: Notification) -> None:
bot.run_forever()
```

### Получение уведомлений через HTTP API

Эта библиотека получает входящие веб-хуки (сообщения, статусы) через HTTP API-запросы в порядке, аналогичном реализации других методов Green API. Хронологический порядок веб-хуков гарантированно соответствует последовательности, в которой они были получены (FIFO). Все входящие веб-крючки хранятся в очереди и ожидаются к получению в течение 24 часов.

Для получения входящих веб-крючков эта библиотека последовательно вызывает два метода: [ReceiveNotification](https://green-api.com/en/docs/api/receiving/technology-http-api/ReceiveNotification/) и [DeleteNotification](https://green-api.com/en/docs/api/receiving/technology-http-api/DeleteNotofication/). Метод `ReceiveNotification` получает входящий вебхук, а метод `DeleteNotification` подтверждает успешное получение и обработку вебхука. Подробнее об этих методах читайте в соответствующих разделах [ReceiveNotification](https://green-api.com/en/docs/api/receiving/technology-http-api/ReceiveNotification/) и [DeleteNotification](https://green-api.com/en/docs/api/receiving/technology-http-api/DeleteNotofication/).

### Как фильтровать входящие сообщения

Сообщения можно фильтровать по чату, по отправителю, по типу и тексту сообщения. Для фильтров чата, отправителя и типа
Expand Down
Loading