Skip to content

Commit

Permalink
Merge pull request #36 from DariusIII/patch-1
Browse files Browse the repository at this point in the history
Add getEpisodeByAirDate function to Client.php
  • Loading branch information
Moinax committed Mar 8, 2016
2 parents 7ddf816 + 1a1d06d commit 68204c7
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/Moinax/TvDb/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,20 @@ public function getEpisodeById($episodeId, $language = null)

return new Episode($data->Episode);
}

/**
* @param $serieId
* @param $airdate
* @param null $language
*
* @return Episode
*/
public function getEpisodeByAirDate($serieId, $airdate, $language = null)
{
$language = $language ? : $this->defaultLanguage;
$data = $this->fetchXml('GetEpisodeByAirDate.php?apikey=' . $this->apiKey . '&seriesid=' . $serieId . '&airdate=' . $airdate . '&language=' . $language );
return new Episode($data->Episode);
}

/**
* Get updates list based on previous time you got data
Expand Down Expand Up @@ -513,4 +527,4 @@ public static function removeEmptyIndexes($array)
sort($array);
return $array;
}
}
}

0 comments on commit 68204c7

Please sign in to comment.