seatplus/esi-client
Composer 安装命令:
composer require seatplus/esi-client
包简介
A standalone ESI (Eve Swagger Interface) Client Library using kevinrob/guzzle-cache-middleware
README 文档
README
A standalone ESI (Eve Swagger Interface) Client Library using kevinrob/guzzle-cache-middleware.
ESI compatibility date: This branch of
esi-clienttargets ESI compatibility date2025-12-16and forward. Responses DTOs are sourced fromseatplus/esi-schema(1.x). If CCP publishes a new breaking compatibility date, a new major version of both packages will be released.
Installation
You can install the package via composer:
composer require seatplus/esi-client
Usage
Typed SDK (recommended)
The SDK exposes typed resource methods. Single-object endpoints return the DTO directly (a subclass of AbstractEsiDto); paginated list endpoints return EsiResult<array<T>>.
use Seatplus\EsiClient\EsiClient; $sdk = new EsiClient(); // Single object — returns AllianceDetail directly $alliance = $sdk->alliance()->getAlliancesAllianceId(99000006); echo $alliance->name; // typed readonly string echo $alliance->ticker; $alliance->isCachedLoad; // bool — true if served from RFC 7234 cache // Authenticated endpoint — returns CharactersDetail directly $character = $sdk->withToken($accessToken)->characters()->getCharactersCharacterId(95725047); echo $character->name; // Paginated list — returns EsiResult (pages metadata needed) $result = $sdk->withToken($accessToken)->assets()->getCharactersCharacterIdAssets(95725047, page: 1); echo $result->pages; // total pages from X-Pages header foreach ($result->data as $asset) { echo $asset->item_id; // typed readonly int }
Low-level transport
$esi = new EsiClient(); // make a call — returns EsiResponse $response = $esi->invoke('get', '/characters/{character_id}/', [ 'character_id' => 95725047, ]); // $response->data — stdClass decoded from the JSON body // $response->pages — total pages (from X-Pages header, or 1) // $response->isCachedLoad() — true if served from RFC 7234 cache
Rate limiting
ESI enforces a 1800-token / 15-minute rolling window (one token consumed per request,
irrespective of response code). esi-client itself does not throttle — rate limiting is
handled by the consumer layer (eveapi) using Laravel Horizon throttle middleware on each
queued job.
If the HTTP client receives a 420 Error Limited response, the request is retried with
exponential backoff as configured on the job.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
As of today this esi client only supports Laravel Cache Middleware. However Kevinrob/guzzle-cache-middleware supports various others such as:
- Doctrine cache
- Laravel cache
- Flysystem
- PSR6
- WordPress Object Cache
if you plan to use this client with any of these a proper CacheMiddleware would be needed. Same goes to the HTTP client. This client and its cache middleware had been designed to use with Guzzle7 (but you can use it with any PSR-7 HTTP client). Please submit your PR accordingly implementing other HTTP clients.
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
seatplus/esi-client 适用场景与选型建议
seatplus/esi-client 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4.15k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2021 年 09 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「cache」 「library」 「esi」 「laravel」 「EVE Online」 「cache-control」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 seatplus/esi-client 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 seatplus/esi-client 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 seatplus/esi-client 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
repository php library
Render content in fusion as esi:include
Laravel 5 - Repositories to the database layer
A Symfony bundle that displays debug information for ESI requests.
Inbox pattern process implementation for your Laravel Applications
Client library for EVE Online API (ESI)
统计信息
- 总下载量: 4.15k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 18
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-09-23