kozennnn/tmdb-api

A PHP package to make The Movie Database API easier to use

Installs: 24

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 1

Forks: 0

pkg:composer/kozennnn/tmdb-api

dev-main 2022-07-20 14:44 UTC

This package is auto-updated.

Last update: 2025-12-20 22:29:06 UTC


README

A PHP package to make The Movie Database API easier to use.

Table of Contents

Requirements

  • PHP 7.0, 8.0 or 9.0

Installation

composer require kozennnn/tmdb-api

Usage

The following code return the movie with id 76341.

<?php

use Kozennnn\TmdbAPI\TmdbClient;

$client = new TmdbClient("<YOUR_API_KEY>");
$movie = $client->Movies()->getMovie(76341);

If you don't know how to get an API key from The Movie Database just click here to see how to get one.

You can even provide parameters.

<?php

use Kozennnn\TmdbAPI\TmdbClient;

$client = new TmdbClient("<YOUR_API_KEY>");
$movie = $client->Movies()->getMovie(76341, ['language' => 'fr']);

For further explanations, just take a look a our wiki!

Wiki

Testing

php tests/MovieTest.php