spiregg/riot-api-datadragon 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

spiregg/riot-api-datadragon

Composer 安装命令:

composer require spiregg/riot-api-datadragon

包简介

Riot DataDragon API wrapper for PHP8

README 文档

README

Version v1.0.0

Build Status Test Coverage Packagist Packagist Support Project

Table of Contents

  1. Introduction
  2. Downloading
  3. DataDragon API

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:

Orianna Dark Star Orianna

...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:

Heart of Gold Madred's Bloodrazor Leviathan

...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:

Orianna OrianaIzunaCommand OrianaDissonanceCommand OrianaRedactCommand OrianaDetonateCommand

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) GitHub Latest Release GitHub Release PHP Version
League of Legends API GitHub Latest Release GitHub Release PHP Version
Teamfight Tactics API GitHub Latest Release GitHub Release PHP Version
Legends of Runeterra API GitHub Latest Release GitHub Release PHP Version
Valorant API GitHub Latest Release GitHub Release PHP Version

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 我们能提供哪些服务?
定制开发 / 二次开发

基于 spiregg/riot-api-datadragon 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 863
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 14
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2023-03-19