lolprosgg/seraphp

围绕Riot Games API的包装器。

0.0.5 2023-04-13 16:02 UTC

This package is auto-updated.

Last update: 2024-09-14 17:00:58 UTC


README

PHP包装Riot Games API。

特性

  • 🎉 符合PSR-18 & PSR-17规范 - 不再依赖特定的HTTP客户端!
  • 🎉 依赖注入优先 - 与所有现代框架轻松使用!
  • 🎉 GitHub Actions进行质量保证 - 简单易用!
  • 🎉 单一责任 - 仅内部API通信!

入门指南

SeraPHPhine可以通过 Composer 获得。它不自己实现HTTP客户端,并使用PSR-17和PSR-18抽象,因此您可以自由选择任何您想要的HTTP客户端。

composer require simivar/riot-php symfony/http-client nyholm/psr7

API覆盖率

⚠️ 命名中有 删除线 的API已弃用并将被删除。

使用方法

<?php

require_once('vendor/autoload.php');

$config = new \SeraPHP\API\Configuration([
    'api_key' => 'PASTE-YOUR-API-KEY-HERE',
]);
$riotApi = new \SeraPHP\Seraphphine($config);
$lolStatus = $riotApi->getVersion4()
    ->getLolStatus()
    ->getPlatformData(\Riot\Enum\RegionEnum::EUN1())
    ;

法律声明

Riot PHP未获得Riot Games的认可,并不反映Riot Games或任何官方参与制作或管理Riot Games属性的观点或意见。Riot Games以及所有相关属性均为Riot Games, Inc.的商标或注册商标。