This repository holds SDK related to Bot Advertising Platform.
- Python >=3.7
Install the latest version with
$ pip install bapsdk
The BAP SDK uses the UDP protocol for data transfer to ensure minimal SDK overhead for the user.
See examples
At times, BAP may introduce telegram updates within its advertisement flow. To maintain the logical consistency of your bot, it is necessary to ignore such updates.
The BAP.handle_update
method returns a boolean value indicating whether you should proceed with handling the request or skip it as an internal BAP request.
When the method returns false
, it signifies that the current request should not be processed by your bot.
For manual advertisement mode (Should be turned on in settings) call following in the desired ad placements.
bap.send_advertisement(update)
API key is not your Telegram bot token.
API key must be obtained from socialjet.pro
Bugs and feature request are tracked on GitHub
Bot Advertising Platform SDK is licensed under the MIT License - see the LICENSE file for details