chiiya/laravel-tmdb
最新稳定版本:1.4.2
Composer 安装命令:
composer require chiiya/laravel-tmdb
包简介
Laravel SDK for the TMDB API
README 文档
README
A strongly-typed PHP SDK for the TMDB (The Movie Database) API, providing complete coverage of all non-user related APIv3 endpoints with full type safety and IDE autocompletion support.
Uses the Laravel HTTP client for making requests, allowing for easy fake responses in tests.
Index
> Installation > Quickstart > Changelog > Contributing > License
Installation
Install the package via Composer:
composer require chiiya/laravel-tmdb
Next, configure your TMDB API token in your .env file. This should be your API Read Access Token (v4 auth):
TMDB_API_TOKEN="eyJh..."
Quick Start
use Chiiya\Tmdb\Repositories\MovieRepository; use Chiiya\Tmdb\Query\AppendToResponse; class TmdbService { public function __construct( private MovieRepository $movies, ) public function handle(): void { $this->movies->getMovie(550); $this->movies->getPopular(); $movie = $this->movies->getMovie(550, [ new AppendToResponse([ AppendToResponse::IMAGES, AppendToResponse::WATCH_PROVIDERS, ]), ]); $movie->watch_providers['US']->flatrate[0]->provider_name; } }
See tmdb-php for more examples and documentation.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 328
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-06-16
