Asynchronous api of the Flyer service
Project description
Использование
С помощью flyerapi вы можете использовать FlyerAPI вместе с Telegram
Документация: https://api.flyerservice.io/redoc
Установка
pip install flyerapi
Требования
Python 3.7+aiohttp
Возможности
AsynchronousException handling
Пример обязательной подписки с использованием aiogram
from flyerapi import Flyer
from aiogram import types
flyer = Flyer(KEY)
async def message_handler(message: types.Message):
# Применяйте везде, где требуется проверка
if not await flyer.check(message.from_user.id, language_code=message.from_user.language_code):
return
async def callback_handler(call: types.CallbackQuery):
# Применяйте везде, где требуется проверка
if not await flyer.check(call.from_user.id, language_code=call.from_user.language_code):
return
Использование пользовательского сообщения
message = {
'rows': 2,
'text': '<b>Пользовательский текст</b> для $name', # HTML
'button_bot': 'Запустить',
'button_channel': 'Подписаться',
'button_url': 'Перейти',
'button_boost': 'Голосовать',
'button_fp': 'Выполнить',
'button_view': 'Смотреть',
}
await flyer.check(user_id, language_code=language_code, message=message)
Пример для заданий
# Получение заданий для пользователя
tasks = await flyer.get_tasks(user_id=user_id, language_code=language_code, limit=5)
# Получиение статуса задания
signature = tasks[0]['signature'] # пример
status = await flyer.check_task(signature)
Пример для использования заданий в обязательной подписки с использованием aiogram
Код вынесен в файл: examples/check_with_tasks.py
Пример вебхуков
Код вынесен в файл: examples/webhook.py
Developed by Eli (c) 2023-2025
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
flyerapi-1.3.1.tar.gz
(5.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flyerapi-1.3.1.tar.gz.
File metadata
- Download URL: flyerapi-1.3.1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84f08eeacd45507511062627bffd31b6e556ef36f5ca4bba8da4d9d98146075c
|
|
| MD5 |
33fcb0f65b3b1cbd3db2ed1fa64095fa
|
|
| BLAKE2b-256 |
2d5898560c2f5fa96542ded1cc8a3c457744de9f139198b07be6474553b0dc22
|
File details
Details for the file flyerapi-1.3.1-py3-none-any.whl.
File metadata
- Download URL: flyerapi-1.3.1-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5097be8bbae56aede416160c7f21b2d2345eb910557d193290fbccfb15232413
|
|
| MD5 |
dba85fdad90fe222e695cda104bbb213
|
|
| BLAKE2b-256 |
a5bd713d61a42fc5ba85ec6e2299aaf4cd268d9c4d48eebc7e292d175086cd2b
|