Skip to main content

Apex Legends API 查询插件,支持玩家数据、地图轮换、服务器状态和顶猎分数查询

Project description

NoneBot-Plugin-Apex-API-Query

✨ 基于 NoneBot 的 Apex Legends API 查询插件 ✨

NoneBot Registry

📖 介绍

基于 NoneBot2 的 Apex Legends API 查询插件,支持 可视化图片卡片纯文本 两种输出模式。

  • 查询玩家数据,自动对比历史记录并展示变化趋势
  • 查询地图轮换(大逃杀 / 排位赛 / 混录带)
  • 查询各分区服务器运行状态
  • 查询各平台顶尖猎杀者排行分数

您可以在 此处 申请您自己的 API 密钥。

申请密钥后重新在 此页面 登录 API 密钥以测试密钥是否可用。

必须将此 API 密钥 链接 至您的 Discord 账户后您的 API 密钥才可用。

由于 API 的限制,您只能在查询玩家信息时使用 EA 账户用户名,而非 Steam 账户用户名。

数据由 API 提供,本插件仅作 数据获取内容转换,如有内容错误均来自 API。

💿 安装

使用 nb-cli 安装

在 nonebot2 项目的根目录下打开命令行,输入以下指令即可安装:

nb plugin install nonebot_plugin_apex_api_query
使用包管理器安装

在 nonebot2 项目的插件目录下,打开命令行,根据你使用的包管理器,输入相应的安装命令:

pip
pip install nonebot_plugin_apex_api_query
poetry
poetry add nonebot_plugin_apex_api_query

随后编辑 nonebot2 项目根目录下的 pyproject.toml 文件,在 [tool.nonebot] 部分追加写入:

plugins = ["nonebot_plugin_apex_api_query"]

⚙️ 配置

在 nonebot2 项目的 .env 文件中添加以下配置:

配置项 类型 必填 默认值 说明
APEX_API_KEY str "" Apex API 密钥,必须填写
APEX_API_URL str https://api.mozambiquehe.re 玩家/服务器/顶猎 API 地址
APEX_MAP_API_URL str https://api.apexlegendsstatus.com 地图轮换 API 地址
APEX_ONLY_TEXT bool False 是否仅使用纯文本输出(不渲染图片)

示例:

APEX_API_KEY = "你的 API 密钥"
# 以下均为可选配置
APEX_MAP_API_URL = "https://api.apexlegendsstatus.com"
APEX_ONLY_TEXT = False

若设置 APEX_ONLY_TEXT = True,所有查询将仅返回纯文本,不会渲染可视化卡片。

🎉 使用

指令表

指令 说明
apex <玩家名称> [平台] 查询玩家信息(默认 PC 平台)
apex m / apex map / apex 地图 查询地图轮换
apex s / apex server / apex 服务器 查询服务器状态
apex p / apex predator / apex 顶猎 查询顶猎分数

支持的平台参数:PCPS4X1SWITCH

🖼️ 效果

默认以可视化卡片形式输出(设置 APEX_ONLY_TEXT=True 则回退为纯文本)。

玩家查询

玩家查询效果

地图轮换

地图轮换效果

服务器状态

服务器状态效果

顶猎排行

顶猎排行效果

💖 鸣谢

📄 许可证

本项目使用 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

nonebot_plugin_apex_api_query-26.6.14.tar.gz (11.3 MB view details)

Uploaded Source

Built Distribution

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

nonebot_plugin_apex_api_query-26.6.14-py3-none-any.whl (11.3 MB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_apex_api_query-26.6.14.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_apex_api_query-26.6.14.tar.gz
Algorithm Hash digest
SHA256 77eaff3250589b34266cb4765770f8214556dcab43eb8abcfa371964ccf55f39
MD5 7828b9bd7f3217322f452891f299f6c5
BLAKE2b-256 7a379e63448d21650dce6c59d66c133b10a7198adfb0bede663e1156b52c8932

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_apex_api_query-26.6.14.tar.gz:

Publisher: publish.yml on H-xiaoH/nonebot-plugin-apex-api-query

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nonebot_plugin_apex_api_query-26.6.14-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_apex_api_query-26.6.14-py3-none-any.whl
Algorithm Hash digest
SHA256 e65b6cb6373f813297cf6716c12612d521a4dd7e10c0621e8910a5f1df9c25f1
MD5 ccc3d8bd28dbe0e877dd1265b155c311
BLAKE2b-256 55141e92fa2d5b6bce933489c855802ce27a8c8f0dadce0b39c64b4f46689360

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_apex_api_query-26.6.14-py3-none-any.whl:

Publisher: publish.yml on H-xiaoH/nonebot-plugin-apex-api-query

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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