爱发电适配器
Project description
nonebot-adapter-afdian
基于 NoneBot2 的爱发电适配器
使用
-
安装
pip install nonebot-adapter-afdian
-
启用
adapters = [ { name = "Afdian", module_name = "nonebot.adapter.afdian" } ]
-
配置
AFDIAN_BOTS='[ { "user_id": "Your User id", "api_token": "Your Api Token" } ]'
API
from nonebot import on_notice
from nonebot.adapters.afdian import OrderNotifyEvent, Bot
test_afd = on_notice()
@test_afd.handle()
async def handle_afd(bot: Bot, event: OrderNotifyEvent):
result1 = await bot.query_order_by_page(page=1)
print(result1)
result2 = await bot.query_order_by_out_trade_no(
out_trade_no="202408070218485652995332024"
)
print(result2)
result3 = await bot.query_order_by_order_list(
order_list=["202408070218485652995332024", "202308281533159897535713113"]
)
print(result3)
result4 = await bot.query_sponsor(page=1)
print(result4)
result5 = await bot.query_sponsor(page=1, per_page=20) # 查询第一页,每页20个
print(result5)
特别感谢
- NoneBot2:开发框架。
贡献与支持
觉得好用可以给这个项目点个 Star
或者去 爱发电 投喂我。
有意见或者建议也欢迎提交 Issues 和 Pull requests 。
开源许可
本项目使用 MIT 作为开源许可证。
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
Built Distribution
File details
Details for the file nonebot_adapter_afdian-0.0.1.tar.gz
.
File metadata
- Download URL: nonebot_adapter_afdian-0.0.1.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.9.19 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b5c87fbe8e24e94a86bf7351baca9cf5731fa4f5646196893814df058bb1441 |
|
MD5 | 72404cf4aa79e49683498651acf91db7 |
|
BLAKE2b-256 | 924ad7b2bdeb54687a048304fb1115cb76c7b44d31e0ff46d16c5940c95f3a03 |
File details
Details for the file nonebot_adapter_afdian-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: nonebot_adapter_afdian-0.0.1-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.9.19 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56d768530716ed93e38e206cd572bad101231946f8a1cbee2f8459e32d201efa |
|
MD5 | c967288f69bef112624b05909f28f315 |
|
BLAKE2b-256 | bc8a4b78a9b03b9649375dc6451ccf78674a25e5b277e5267c2f7b85d5c74a66 |