Download the PHP package evinkuraga/tmdb-api without Composer

On this page you can find all versions of the php package evinkuraga/tmdb-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tmdb-api

A PHP Wrapper for use with the TMDB API.

License Build Status Code Coverage PHP & HHVM

Inspired by php-github-api, php-gitlab-api and the Symfony Community.

If you have any questions or feature requests, please visit the google+ community.

Stable

Latest Stable Version Latest Unstable Version Dependency Status Total Downloads

Currently unit tests are run on travis, with the following versions:

Features

Main features

Other things worth mentioning

Plug-ins

Installation

Install Composer

You are not obliged to move the composer.phar file to your /usr/local/bin, it is however considered easy to have an global installation.

Add the following to your require block in composer.json config

If your new to composer and have no clue what I'm talking about

Just create a file named composer.json in your document root:

Now let's install and pull in the dependencies!

Include Composer's autoloader:

To use the examples provided, copy the apikey.php.dist to apikey.php and change the settings.

Constructing the Client

First we always have to construct the client:

If you'd like to make unsecure requests (by default we use secure requests).

Caching is enabled by default, and uses a slow filesystem handler, which you can either:

This will only keep cache in memory during the length of the request, see the documentation of Doctrine Cache for the available adapters.

Strongly against this, disabling cache:

If you want to add some logging capabilities (requires monolog/monolog), defaulting to the filesystem;

However during development you might like some console magic like ChromePHP or FirePHP;

General API Usage

If your looking for a simple array entry point the API namespace is the place to be.

If you want to provide any other query arguments.

Model Usage

However the library can also be used in an object oriented manner, which I reckon is the preferred way of doing things.

Instead of calling upon the client, you pass the client onto one of the many repositories and do then some work on it.

The repositories also contain the other API methods that are available through the API namespace.

Some other useful hints

Event Dispatching

Since 2.0 requests are handled by the EventDispatcher, which gives you before and after hooks, the before hook allows an event to stop propagation for the request event, meaning you are able to stop the main request from happening, you will have to set a Response object in that event though.

See the files for RequestSubscriber respectively.

Image Helper

An ImageHelper class is provided to take care of the images, which does require the configuration to be loaded:

Plug-ins

At the moment there are only two useful plug-ins that are not enabled by default, and you might want to use these:

Tries to fetch everything it can in Dutch.

We like naughty results, if configured this way, provide false to filter these out.

Collection Filtering

We also provide some easy methods to filter any collection, you should note however you can always implement your own filter easily by using Closures:

These basic filters however are already covered in the Images collection object:

And there are more Collections which provide filters, but you will find those out along the way.

The GenericCollection and the ResultCollection

The GenericCollection holds any collection of objects (e.g. an collection of movies).

The ResultCollection is an extension of the GenericCollection, and inherits the response parameters _(page, total_pages, totalresults) from an result set, this can be used to create paginators.

Help & Donate

If you use this in a project whether personal or business, I'd like to know where it is being used, so please drop me an e-mail! :-)

If this project saved you a bunch of work, or you just simply appreciate my efforts, please consider donating a beer (or two ;))!


All versions of tmdb-api with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
ext-curl Version *
symfony/event-dispatcher Version >=2.4,<8
symfony/options-resolver Version >=2.6,<8
guzzlehttp/guzzle Version >=6.0,<8
psr/log Version ~1.0
doctrine/cache Version ^1.6
kevinrob/guzzle-cache-middleware Version ^2.0 || ^3.0 || ~4.0
rtheunissen/guzzle-log-middleware Version dev-master
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package evinkuraga/tmdb-api contains the following files

Loading the files please wait ....