https://github.com/flowdee/my-api-films-php-class
PHP Class to communicate with My API Films
https://github.com/flowdee/my-api-films-php-class
Last synced: about 1 month ago
JSON representation
PHP Class to communicate with My API Films
- Host: GitHub
- URL: https://github.com/flowdee/my-api-films-php-class
- Owner: flowdee
- License: lgpl-3.0
- Created: 2015-06-11T20:10:41.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-11T21:38:53.000Z (almost 10 years ago)
- Last Synced: 2025-02-02T15:48:53.942Z (3 months ago)
- Language: PHP
- Size: 117 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
#My API Films PHP Class
This PHP Class was created in order to communicate with My API Films.
For more information please take a look into the official [My API Films documentation](http://www.myapifilms.com/ "My API Films documentation").##Installation
In order to use this class respectively the API we suggest using an access **Token** which will be will be mandatory soon. You can easily gent your token [here](http://www.myapifilms.com/form.jsp "here").``` php
// Including class to your project
require('My-API-Films.php');// Setup My API Films with your credentials
$api = new My_API_Films();
$api->set_token('MY_API_FILMS_TOKEN_HERE');
```Please replaced
MY_API_FILMS_TOKEN_HERE
with your private token.##Examples
###Receive movie data by id
``` php
// Receive basic movie data
$movie = $api->get_entry_by_id('tt1843866');
var_dump($movie);
```###Receive movie data by id including additional parameters
``` php
// Prepare parameters
$param = array(
'trailer' => true,
'actors' => 'S'
);// Receive enhanced movie data
$movie = $api->get_entry_by_id('tt1843866', $param);
var_dump($movie);
```###Receive movie trailer url
``` php
// Get movie trailer url
$trailer = $api->get_entry_trailer('tt1843866');
echo($trailer);
```##What's coming next?
I'm planning to enhance the class continuously in order to receive more specific data. Please take a look into the [issues](https://github.com/flowdee/my-api-films-php-class/issues "issues") and create a new one if you need a special function/enhancement.##Credits
* [My API Films](http://www.myapifilms.com/ "My API Films")If you don't want to miss an update or say hello, follow me on Twitter: [@flowdee](https://twitter.com/flowdee "@flowdee") :wink: