Skip to content

Commit

Permalink
Adding examples for companies.
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfzdotnet committed Mar 8, 2014
1 parent af53349 commit 4b04471
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
21 changes: 21 additions & 0 deletions examples/companies/api/get.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* This file is part of the Tmdb PHP API created by Michael Roterman.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @package Tmdb
* @author Michael Roterman <[email protected]>
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
require_once '../../../vendor/autoload.php';
require_once '../../../apikey.php';

$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);

$company = $client->getCompaniesApi()->getCompany(1);

var_dump($company);
21 changes: 21 additions & 0 deletions examples/companies/api/get_movies.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* This file is part of the Tmdb PHP API created by Michael Roterman.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @package Tmdb
* @author Michael Roterman <[email protected]>
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
require_once '../../../vendor/autoload.php';
require_once '../../../apikey.php';

$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);

$companyMovies = $client->getCompaniesApi()->getMovies(1);

var_dump($companyMovies);
22 changes: 22 additions & 0 deletions examples/companies/model/get_movies.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
/**
* This file is part of the Tmdb PHP API created by Michael Roterman.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @package Tmdb
* @author Michael Roterman <[email protected]>
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
require_once '../../../vendor/autoload.php';
require_once '../../../apikey.php';

$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);

$repository = new \Tmdb\Repository\CompanyRepository($client);
$companyMovies = $repository->getMovies(1);

var_dump($companyMovies);

0 comments on commit 4b04471

Please sign in to comment.