Skip to main content

Модуль для работы с Donation Alerts API

Project description

DA API

Инструменты 🛠

Python aiohttp python-socketio websockets websocket-client

requests asyncio json datetime

Установка 💾

windows: pip install DonationAlertsAPI

linux macos: pip3 install DonationAlertsAPI

Пример использования 🎈

from flask import Flask, redirect, request
from donationalerts import DonationAlertsAPI, Scopes

app = Flask(__name__)
api = DonationAlertsAPI("client id", "client secret", "http://127.0.0.1:5000/login", Scopes.USER_SHOW)

@app.route("/", methods=["GET"])
def index():
    return redirect(api.login())


@app.route("/login", methods=["GET"])
def login():
    code = request.args.get("code")
    access_token = api.get_access_token(code)
    
    user = api.user(access_token)
    return user.objects


if __name__ == "__main__":
    app.run(debug=True)

Смотреть больше примеров

Обзоры версий 👀
Donation Alerts API Версия 1.0.0
Donation Alerts API Версия 1.0.6
Donation Alerts API Версия 2.0.0

Присоединяйся к нам

Vkontakte YouTube Telegram

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

DonationAlertsAPI-2.0.2.tar.gz (6.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page