Download the PHP package chiiya/tmdb-php without Composer
On this page you can find all versions of the php package chiiya/tmdb-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download chiiya/tmdb-php
More information about chiiya/tmdb-php
Files in chiiya/tmdb-php
Package tmdb-php
Short Description PHP SDK for the TMDB API
License MIT
Homepage https://github.com/chiiya/tmdb-php
Informations about the package tmdb-php
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.
Looking for a Laravel package? Check out chiiya/laravel-tmdb
.
Index
> Installation > Quickstart > Core Concepts > Repositories > Query Parameters > FAQ > Changelog > Contributing > License
Installation
Install the package via Composer:
Requirements
- PHP 8.2 or higher
- TMDB API v4 access token
API Token Setup
You need to create a v4 auth token for the TMDB API. You can find it under
API > API Read Access Token
in your TMDB account settings.
Quick Start
Core Concepts
Architecture
The library follows a repository pattern where each API domain has its own repository class:
- Repositories: Handle API calls and return strongly-typed entities
- Entities: Represent API response data with full type safety
- Query Parameters: Provide type-safe parameter objects for API requests
- Responses: Paginated response wrappers for list endpoints
Repositories
The library provides repositories for all major TMDB API domains:
MovieRepository
Handles all movie-related API endpoints.
TvShowRepository
Handles all TV show-related API endpoints.
Other Repositories
The library also includes repositories for:
- SearchRepository: Search endpoints
- PersonRepository: People/actors information
- TvSeasonRepository: TV season details
- TvEpisodeRepository: TV episode details
- CompanyRepository: Production companies
- CollectionRepository: Movie collections
- GenreRepository: Movie and TV genres
- KeywordRepository: Keywords
- ReviewRepository: Reviews
- CreditRepository: Credits
- ConfigurationRepository: API configuration
- CertificationRepository: Content ratings
- ChangeRepository: Recent changes
- BrowseRepository: Browse endpoints
- WatchProviderRepository: Streaming providers
- NetworkRepository: TV networks
Query Parameters
The library provides type-safe query parameter objects for API requests. All parameters implement
the QueryParameterInterface
.
Common Parameters
Using Parameters
FAQ
How do I handle API rate limits?
The library handles rate limiting by sleeping for the necessary time (indicated by the retry-after
header) when a rate limit error occurs. However, you should ensure your application stays within
TMDB's rate limits to avoid hitting them frequently.
Can I use this with Laravel?
Yes, but this is a standalone library. For Laravel integration, check out chiiya/laravel-tmdb
.
How do I get streaming provider information?
Use the AppendToResponse::WATCH_PROVIDERS
parameter when getting movie or TV show details:
How do I get images with different sizes?
Images are returned with file paths. You need to construct the full URL using TMDB's image base URL:
How do I handle pagination?
List responses include pagination information:
What API endpoints are not covered?
This library covers all non-account-related API endpoints. Specifically excluded are:
- Account-related endpoints
- Authentication endpoints
- Guest Sessions
- Lists
- Account States
- Rating endpoints
- v4 API endpoints
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.
All versions of tmdb-php with dependencies
antwerpes/data-transfer-object Version ^1.0
guzzlehttp/guzzle Version ^7.4