spiregg/riot-api-datadragon
Composer 安装命令:
composer require spiregg/riot-api-datadragon
包简介
Riot DataDragon API wrapper for PHP8
关键字:
README 文档
README
Version v1.0.0
Table of Contents
Introduction
Welcome to the DataDragon PHP library repo! The goal of this library is to create easy-to-use library for anyone who might need one.
Here are some handy features:
- Profile icon URL and HTML embed generating
- Champion splash image URL and HTML embed generating
- Champion loading image URL and HTML embed generating
- Champion icon URL and HTML embed generating
- Sprite image URL and HTML embed generating
- Spell, passive, item and summoner spell icon URL and HTML embed generating
- Runes reforged icon URL and HTML embed generating
- Static resource (champions, spells, items, runes, ...) loading and processing
Please, refer mainly to the wiki pages. This file contains only general introduction to library features.
Downloading
The easiest way to download and use this library is via Composer. If you are not using Composer yet, you should start right now!
While having Composer installed on your machine it takes only composer require "dolejska-daniel/riot-api-datadragon:^1" command to get the library ready to roll!
For additional information about downloading and initial setup, please see the wiki pages.
DataDragon API
How easy is it to work with static images? For instance, to get loading screen art of Orianna?
Source:
echo DataDragonAPI::getChampionLoading('Orianna'); echo DataDragonAPI::getChampionLoading('Orianna', 7);
Output:
<img alt="Orianna" class="dd-icon dd-loading" src="https://ddragon.leagueoflegends.com/cdn/img/champion/loading/Orianna_0.jpg"> <img alt="Orianna" class="dd-icon dd-loading" src="https://ddragon.leagueoflegends.com/cdn/img/champion/loading/Orianna_7.jpg">
Render:
...a bit of nostalgia?
Source:
DataDragonAPI::iniByVersion('0.151.2'); echo DataDragonAPI::getItemIcon(3132); echo DataDragonAPI::getItemIcon(3126); echo DataDragonAPI::getItemIcon(3138);
Output:
<img alt="3132" class="dd-icon dd-item" src="https://ddragon.leagueoflegends.com/cdn/0.151.2/img/item/3132.png"> <img alt="3126" class="dd-icon dd-item" src="https://ddragon.leagueoflegends.com/cdn/0.151.2/img/item/3126.png"> <img alt="3138" class="dd-icon dd-item" src="https://ddragon.leagueoflegends.com/cdn/0.151.2/img/item/3138.png">
Render:
...or to display icon of champion and its spells based on its object from API?
Source:
// ... $orianna = $api->getStaticChampion(61, true); echo DataDragonAPI::getChampionSplashO($orianna); foreach($orianna->spells as $spell) echo DataDragonAPI::getChampionSpellIconO($spell);
Output:
<img alt="Orianna" class="dd-icon dd-icon-champ" src="https://ddragon.leagueoflegends.com/cdn/8.24.1/img/champion/Orianna.png"> <img alt="OrianaIzunaCommand" class="dd-icon dd-spell" src="https://ddragon.leagueoflegends.com/cdn/8.24.1/img/spell/OrianaIzunaCommand.png"> <img alt="OrianaDissonanceCommand" class="dd-icon dd-spell" src="https://ddragon.leagueoflegends.com/cdn/8.24.1/img/spell/OrianaDissonanceCommand.png"> <img alt="OrianaRedactCommand" class="dd-icon dd-spell" src="https://ddragon.leagueoflegends.com/cdn/8.24.1/img/spell/OrianaRedactCommand.png"> <img alt="OrianaDetonateCommand" class="dd-icon dd-spell" src="https://ddragon.leagueoflegends.com/cdn/8.24.1/img/spell/OrianaDetonateCommand.png">
Render:
For more, please see the wiki pages. More usage examples for DataDragonAPI can be found here.
Other Riot APIs
| Library Description | Latest Version | Stable Version |
|---|---|---|
| All APIs (metapackage) | ||
| League of Legends API | ||
| Teamfight Tactics API | ||
| Legends of Runeterra API | ||
| Valorant API |
spiregg/riot-api-datadragon 适用场景与选型建议
spiregg/riot-api-datadragon 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 863 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 03 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「wrapper」 「Riot」 「data dragon」 「php8」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 spiregg/riot-api-datadragon 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 spiregg/riot-api-datadragon 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 spiregg/riot-api-datadragon 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
LinkedIn API PHP SDK with OAuth 2.0 & CSRF support. Can be used for social sign in or sharing on LinkedIn. Examples. Documentation.
LinkedIn API PHP SDK with OAuth 2.0 & CSRF support. Can be used for social sign in or sharing on LinkedIn. Examples. Documentation.
A PSR-7 compatible library for making CRUD API endpoints
Riot (RSO) OAuth 2.0 support for the PHP League's OAuth 2.0 Client
Generic base for simple Riot API PHP wrapper implementation.
gv config package
统计信息
- 总下载量: 863
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 14
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2023-03-19