forked from php-tmdb/api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Credits API in the Api namespace.
- Loading branch information
1 parent
e2aed78
commit 0bc00e1
Showing
3 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
|
||
$credit = $client->getCreditsApi()->getCredit('52542282760ee313280017f9'); | ||
|
||
var_dump($credit); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?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 | ||
*/ | ||
namespace Tmdb\Api; | ||
|
||
class Credits | ||
extends AbstractApi | ||
{ | ||
/** | ||
* Get the detailed information about a particular credit record. This is currently only supported with the new credit model found in TV. | ||
* These ids can be found from any TV credit response as well as the tv_credits and combined_credits methods for people. | ||
* | ||
* The episodes object returns a list of episodes and are generally going to be guest stars. | ||
* The season array will return a list of season numbers. | ||
* | ||
* Season credits are credits that were marked with the "add to every season" option in the editing interface | ||
* and are assumed to be "season regulars". | ||
* | ||
* @param $credit_id | ||
* @param array $parameters | ||
* @param array $headers | ||
* @return mixed | ||
*/ | ||
public function getCredit($credit_id, array $parameters = array(), array $headers = array()) | ||
{ | ||
return $this->get('credit/' . $credit_id, $parameters, $headers); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters