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.
Splitting up Tv into Tv, TvSeason and TvEpisode
- Loading branch information
1 parent
0812794
commit 3ce13f6
Showing
4 changed files
with
130 additions
and
84 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
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,75 @@ | ||
<?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; | ||
|
||
use Tmdb\Exception\NotImplementedException; | ||
|
||
class TvEpisode | ||
extends AbstractApi | ||
{ | ||
/** | ||
* Get the primary information about a TV episode by combination of a season and episode number. | ||
* | ||
* @param $tvshow_id | ||
* @param $season_number | ||
* @param $episode_number | ||
* @param array $options | ||
* @return mixed | ||
*/ | ||
public function getEpisode($tvshow_id, $season_number, $episode_number, array $options = array()) | ||
{ | ||
return $this->get(sprintf('tv/%s/season/%s/episode/%s', $tvshow_id, $season_number,$episode_number), $options); | ||
} | ||
|
||
/** | ||
* Get the TV episode credits by combination of season and episode number. | ||
* | ||
* @param $tvshow_id | ||
* @param $season_number | ||
* @param $episode_number | ||
* @param array $options | ||
* @return mixed | ||
*/ | ||
public function getEpisodeCredits($tvshow_id, $season_number, $episode_number, array $options = array()) | ||
{ | ||
return $this->get(sprintf('tv/%s/season/%s/episode/%s/credits', $tvshow_id, $season_number,$episode_number), $options); | ||
} | ||
|
||
/** | ||
* Get the external ids for a TV episode by comabination of a season and episode number. | ||
* | ||
* @param $tvshow_id | ||
* @param $season_number | ||
* @param $episode_number | ||
* @param array $options | ||
* @return mixed | ||
*/ | ||
public function getEpisodeExternalIds($tvshow_id, $season_number, $episode_number, array $options = array()) | ||
{ | ||
return $this->get(sprintf('tv/%s/season/%s/episode/%s/external_ids', $tvshow_id, $season_number,$episode_number), $options); | ||
} | ||
|
||
/** | ||
* Get the images (episode stills) for a TV episode by combination of a season and episode number. | ||
* | ||
* @param $tvshow_id | ||
* @param $season_number | ||
* @param $episode_number | ||
* @param array $options | ||
* @return mixed | ||
*/ | ||
public function getEpisodeImages($tvshow_id, $season_number, $episode_number, array $options = array()) | ||
{ | ||
return $this->get(sprintf('tv/%s/season/%s/episode/%s/images', $tvshow_id, $season_number,$episode_number), $options); | ||
} | ||
} |
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,45 @@ | ||
<?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; | ||
|
||
use Tmdb\Exception\NotImplementedException; | ||
|
||
class TvSeason | ||
extends AbstractApi | ||
{ | ||
/** | ||
* Get the primary information about a TV season by its season number. | ||
* | ||
* @param $tvshow_id | ||
* @param $season_number | ||
* @param array $options | ||
* @return mixed | ||
*/ | ||
public function getSeason($tvshow_id, $season_number, array $options = array()) | ||
{ | ||
return $this->get(sprintf('tv/%s/season/%s', $tvshow_id, $season_number), $options); | ||
} | ||
|
||
/** | ||
* Get the external ids that we have stored for a TV season by season number. | ||
* | ||
* @param $tvshow_id | ||
* @param $season_number | ||
* @param array $options | ||
* @return mixed | ||
*/ | ||
public function getSeasonExternalIds($tvshow_id, $season_number, array $options = array()) | ||
{ | ||
return $this->get(sprintf('tv/%s/season/%s/external_ids', $tvshow_id, $season_number), $options); | ||
} | ||
} |
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