fuitad/gazelle
Composer 安装命令:
composer require fuitad/gazelle
包简介
PHP library for the Kitsu API (zou), based on the gazu python library
README 文档
README
A PHP client library for the Kitsu / Zou production tracker API. Based on the gazu python library.
Requirements
- PHP 8.1+
- Guzzle HTTP 7.x (installed automatically via Composer)
Installation
composer require fuitad/gazelle
Quick Start
use Gazelle\Gazelle; $gazelle = new Gazelle('https://your-kitsu-server.example.com/api'); // Authenticate $gazelle->logIn('user@example.com', 'password'); // List all open projects $projects = $gazelle->project->allOpenProjects(); // Get all shots for a project $shots = $gazelle->shot->allShotsForProject($projects[0]); // Log out $gazelle->logOut();
Modules
Every module is accessible as a public property on the Gazelle instance.
| Property | Description |
|---|---|
$gazelle->asset |
Assets, asset types, asset instances |
$gazelle->shot |
Shots, sequences, episodes |
$gazelle->scene |
Scenes, asset instances, camera instances |
$gazelle->task |
Tasks, task types, task statuses, comments |
$gazelle->project |
Projects, project settings, team management |
$gazelle->person |
People, departments, avatars |
$gazelle->user |
Current-user-scoped queries |
$gazelle->files |
Output files, working files, preview files, softwares |
$gazelle->casting |
Shot / asset / episode casting |
$gazelle->edit |
Edits |
$gazelle->entity |
Generic entities and entity types |
$gazelle->studio |
Studios |
$gazelle->sync |
Event feed, project export / import |
$gazelle->playlist |
Playlists |
$gazelle->concept |
Concepts |
$gazelle->context |
Admin/user-context-aware convenience wrappers |
Model Parameters
All methods that accept a model (project, shot, asset, etc.) accept either:
- A UUID string:
'550e8400-e29b-41d4-a716-446655440000' - An associative array with at least an
'id'key:['id' => '550e8400-...', 'name' => 'My Project']
This means you can pass model arrays directly from previous API calls.
Authentication
// Password login $tokens = $gazelle->logIn('user@example.com', 'password'); // MFA (TOTP) $tokens = $gazelle->logIn('user@example.com', 'password', totp: '123456'); // Use an existing token $gazelle->setToken('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'); // Or with refresh token $gazelle->setToken([ 'access_token' => 'eyJ...', 'refresh_token' => 'eyJ...', ]); // Refresh the access token manually $gazelle->refreshAccessToken(); // Log out $gazelle->logOut();
See docs/authentication.md for the full reference.
Configuration
$gazelle = new Gazelle( host: 'https://kitsu.example.com/api', sslVerify: true, // Verify SSL certificates useRefreshToken: true, // Auto-refresh on token expiry callbackNotAuthenticated: function($client, $path) { // Called when a 401 is received. // Return true to retry the request, false to throw NotAuthenticatedException. return false; }, ); // Change host at runtime $gazelle->setHost('https://other-kitsu.example.com/api'); // Check connectivity $gazelle->hostIsUp(); // bool $gazelle->hostIsValid(); // bool (checks /api endpoint responds)
Exceptions
All exceptions live under Gazelle\Exception\.
| Exception | HTTP status | Meaning |
|---|---|---|
AuthFailedException |
— | Login credentials rejected |
NotAuthenticatedException |
401 / 422 | Not authenticated |
NotAllowedException |
403 | Insufficient permissions |
RouteNotFoundException |
404 | Endpoint not found |
MethodNotAllowedException |
405 | Wrong HTTP method |
ParameterException |
400 | Bad request / missing field |
TooBigFileException |
413 | Upload too large |
ServerErrorException |
500 / 502 | Server-side error |
UploadFailedException |
— | File upload rejected |
DownloadFileException |
— | File download failed |
FileDoesntExistException |
— | Local file not found before upload |
TaskStatusNotFoundException |
— | Task status ID not in the server list |
TaskMustBeAnArrayException |
— | Task passed as string where array required |
Documentation
- Authentication
- Asset
- Shot
- Scene
- Task
- Project
- Person
- User
- Files
- Casting
- Edit
- Entity
- Studio
- Sync
- Playlist
- Concept
- Context
Testing
composer install ./vendor/bin/phpunit
Related Projects
- gazu — Official Python client (this library mirrors its API)
- zou — The Kitsu back-end
- Kitsu — The production tracker UI
License
MIT
fuitad/gazelle 适用场景与选型建议
fuitad/gazelle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 02 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「pipeline」 「animation」 「kitsu」 「zou」 「cgwire」 「vfx」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 fuitad/gazelle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 fuitad/gazelle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 fuitad/gazelle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Lightweight, cross-browser and highly customizable animated scrolling with jQuery
A reliable and extensible PHP image manipulation library
Pipeline
Wrapper of spin.js component. An animated CSS3 loading spinner with VML fallback for IE.
Renderforest SDK for PHP
AssetBundle for jQuery Counter-Up Plugin https://github.com/NawaraGFX/Counter-Up
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 30
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-26