Skip to content

codd-tech/bap-sdk-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bot Advertising Platform SDK

PyPi Package Version Supported python versions

This repository holds SDK related to Bot Advertising Platform.

Requirements

  • Python >=3.7

Installation

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.

Usage

See examples

Interrupting control flow

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

API key is not your Telegram bot token.

API key must be obtained from socialjet.pro

About

Submitting bugs and feature requests

Bugs and feature request are tracked on GitHub

License

Bot Advertising Platform SDK is licensed under the MIT License - see the LICENSE file for details