Exemplo n.º 1
0
 /**
  *  Reload the content of this class.<br>
  *  Could be used to update or complete the information.
  *  
  *  @param TMDB $tmdb An instance of the API handler, necesary to make the API call.
  */
 public function reload($tmdb)
 {
     $tmdb->getEpisode($this->getTVShowID(), $this->getSeasonNumber(), $this->getEpisodeNumber);
 }
Exemplo n.º 2
0
    echo '<li><a href="https://www.themoviedb.org/tv/season/' . $season->getID() . '">Season ' . $season->getSeasonNumber() . '</a></li>';
}
echo ' </ul></ul>';
echo '<img src="' . $tmdb->getImageURL('w185') . $tvShow->getPoster() . '"/><br>...<hr>';
// 3 Get Season Info
echo '<li><a id="seasonInfo"><h3>Full Season Info</h3></a>';
$season = $tmdb->getSeason($tvShow->getID(), 2);
echo 'Now the <b>$season</b> var got all the data, check the <a href="http://code.octal.es/php/tmdb-api/class-Season.html">documentation</a> for the complete list of methods.<br><br>';
echo '<b>' . $season->getName() . '</b><ul>';
echo '  <li>ID: ' . $season->getID() . '</li>';
echo '  <li>AirDate: ' . $season->getAirDate() . '</li>';
echo '  <li>Number of Episodes: ' . $season->getNumEpisodes() . '</li>';
echo '  <li>Episodes: <ul>';
$episodes = $season->getEpisodes();
foreach ($episodes as $episode) {
    echo '<li><a href="https://www.themoviedb.org/tv/' . $episode->getTVShowID() . '/season/' . $episode->getSeasonNumber() . '/episode/' . $episode->getEpisodeNumber() . '">' . $episode->getEpisodeNumber() . ' - ' . $episode->getName() . '</a></li>';
}
echo ' </ul></ul>...<hr>';
// 4 Get Episode Info
echo '<li><a id="episodeInfo"><h3>Full Episode Info</h3></a>';
$episode = $tmdb->getEpisode($tvShow->getID(), 2, 8);
echo 'Now the <b>$episode</b> var got all the data, check the <a href="http://code.octal.es/php/tmdb-api/class-Episode.html">documentation</a> for the complete list of methods.<br><br>';
echo '<b>' . $episode->getEpisodeNumber() . ' - ' . $episode->getName() . '</b><ul>';
echo '  <li>ID: ' . $episode->getID() . '</li>';
echo '  <li>AirDate: ' . $episode->getAirDate() . '</li>';
echo '  <li>Vote Average: ' . $episode->getVoteAverage() . '</li>';
echo '  <li>Vode Count: ' . $episode->getVoteCount() . '</li>';
echo ' </ul></ul>...<hr>';
?>
    </body>
</html>