Handling your donation in real time
Project description
Get token
Get client_id and client_secret - here
import donationalerts
auth = donationalerts.Authorization("CLIENT_ID", "CLIENT_SECRET")
auth.start_authorization()
Test application
Donation notifer
import donationalerts
import win10toast
token = "YOUR_TOKEN_HERE"
donation = donationalerts.DonationAlerts(token)
notify = win10toast.ToastNotifier()
@donation.handler
def on_donate(donation_data):
notify.show_toast(
title=f"{donation_data['username']} donated {donation_data['amount']}{donation_data['currency']}!",
msg=donation_data["message"],
duration=10
)
if __name__ == "__main__":
donation.polling()
by @cxldxice with ♥
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
donationalerts-1.0.1.tar.gz
(2.9 kB
view details)
File details
Details for the file donationalerts-1.0.1.tar.gz
.
File metadata
- Download URL: donationalerts-1.0.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6410f4f78cef0389067cb7d0d26b7d22219584b27d67e6dd074e94844788277 |
|
MD5 | 1f2a3e214d5c8c45c89c5b550594ed1e |
|
BLAKE2b-256 | 415cceca475f44107c0887dd01706055df3e719e946b600de27f5b9f0bc9bc68 |