Skip to main content
NoneBotPluginLogo

nonebot_plugin_smallapi

✨ 高效,快速的小小WEBAPI调用插件! ✨

GitHub stars GitHub issues GitHub forks license pypi python

🙏 致谢

感谢大佬lgc2333提供借鉴源代码 借鉴的代码

📖 前言及介绍

PS: 这是我第一次写(划掉,是借鉴去ctrlcv!详见最下方致谢)插件,没有多少经验,写的也不规范,如果介意可以不用,望多多关照~(如果可以,给个star)
不要喷我~这个插件大佬5分钟就能搓出来……我是为了那些想写插件但是不会写的人群而写的这个插件,你可以随便借鉴,没什么精髓,只要标明致谢就好了~(╥╯^╰╥)
这个插件主要功能是调用WEBAPI链接获取数据处理后发到QQ里面的,目前统一使用json调用并解析,有问题记得issues!

🔧 开发环境

Nonebot2:2.0.0rc4
python:3.11.3
操作系统:Linux(Windows兼容性问题不大)
编辑器:VS Code

💿 安装

1. nb-cli安装(推荐)

在你bot工程的文件夹下,运行cmd/shell(运行路径要对啊),执行nb命令安装插件,插件配置会自动添加至配置文件

nb plugin install nonebot_plugin_smallapi

2. pip安装

pip install nonebot_plugin_smallapi

如果是默认nb-cli创建的nonebot2的话,在bot路径pyproject.toml[tool.nonebot.plugins]中添加一行即可
pyproject.toml配置例如:

[tool.nonebot.plugins]
......
nonebot-plugin-smallapi = ["nonebot_plugin_smallapi"]

3. 本地安装(不推荐)

访问项目Pypi主页下载.tar.gz文件 也可以直接下载压缩包到插件目录解压,然后同样提取nonebot_plugin_smallapi至上一级目录。
目录结构: 你的bot/src/plugins/nonebot_plugin_smallapi/__init__.py
不再提供github仓库资源版本(懒)

更新版本

nb plugin update nonebot_plugin_smallapi

⚙️ 配置

在 nonebot2 项目的.env文件中添加下表中的必填配置

配置项 必填 默认值 说明
smallapi_token 故梦API的调用KEY

例如.env.prod :

...
smallapi_token="qwer1234114514"
#不可以填纯数字哈,不可以没有""哈,除非你闲的没事a.e
#密钥获取网址: https://www.gmya.net/api
#没有你就填
smallapi_token=""
#这是必填配置项!!!  

不填写也能用,但是有调用限制哈!

🎉 功能

  1. 超级多看下面的吧

👉 命令

PS: 请查看你env中起始符的配置(默认/)

  1. 小小图片
  2. 小小文本
  3. 小小网站

小小图片

命令结构:(/)小小图片
例如:小小图片

小小文本

命令结构:(/)小小文本
例如:小小文本

小小网站

命令结构:(/)小小网站
例如:小小网站

⚙ 拓展

还没有呢~

📝 更新日志

展开/收起

2.0.1

  • 修依赖xN

2.0.0

  • 大版本更新

1.1.6/1.1.7

  • None

1.1.5

  • 调用地址更新
  • 增加故梦的appkey调用方法
  • 此版本未修复部分功能的兼容性问题,如需使用请提交Issus!

1.1.0

  • 站点代码重写更新

1.0.7

  • 优化更新

1.0.6

  • 维护更新,蟒蛇(Python)版本要求最低改为3.10

1.0.5

  • 修复ip查询中的致命语法错误

1.0.4

  • 更换稳定API, 修复部分Bug

1.0.3

  • 梅开三度,终于修好了依赖

1.0.2

  • 梅开二度.

1.0.1

  • 修复依赖问题

1.0.0

  • 插件初次发布

致谢

Download files

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

Source Distribution

nonebot_plugin_smallapi-2.0.1.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_smallapi-2.0.1-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_smallapi-2.0.1.tar.gz.

File metadata

  • Download URL: nonebot_plugin_smallapi-2.0.1.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for nonebot_plugin_smallapi-2.0.1.tar.gz
Algorithm Hash digest
SHA256 8531f5eae12a3e2c06678498c77333e707defdfa124141480af8b3299d8858bc
MD5 a59045fd2f2de096378a1df9149389be
BLAKE2b-256 130989e8ea1a6fe20fe58e08563b059f4d5c7056cd86fed77cf8d9ee135fed4b

See more details on using hashes here.

File details

Details for the file nonebot_plugin_smallapi-2.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_smallapi-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 abed85439ed8649ea078616fd69afabb2346133b605657cc9bcc4214a7d4a952
MD5 fbba8a30ac8dbdc962ea42f627737346
BLAKE2b-256 3e360d79ccd9357d27e6e981b2215814c1a3d7b4619040b3e8e91a1ab0d230ff

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 files

2.0.0

2 files

1.1.7

2 files

1.1.6

2 files

1.1.5

2 files

1.1.0

2 files

1.0.7

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page