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.apexlegendsstatus.com API 地址(玩家/地图/服务器/顶猎共用)
APEX_ONLY_TEXT bool False 是否仅使用纯文本输出(不渲染图片)

示例:

APEX_API_KEY = "你的 API 密钥"
# 以下均为可选配置
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.21.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.21-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.21.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_apex_api_query-26.6.21.tar.gz
Algorithm Hash digest
SHA256 55a901791a0499b3d54689072a7e7f1dda501ff78918bf98148aae86830ffa66
MD5 2c80739cf4f019bc829848433a7ef89a
BLAKE2b-256 9be8a2c0bd472b791b83fafba01acdb973bd7afb2ae7d0c51550028681060b15

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_apex_api_query-26.6.21.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.21-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_apex_api_query-26.6.21-py3-none-any.whl
Algorithm Hash digest
SHA256 516b8a3cad0db5943723ba53ff9c17933ffb4217c9b227e5ad78b8b21011309d
MD5 3afb21383ab874ca6b5dda73b385ffbe
BLAKE2b-256 27c67836cf514d4a1b0b3ac0f049ffbdadc01bb3895c196f655b791c704d7354

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_apex_api_query-26.6.21-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