getSerieByRemoteId() public method

Find a tv serie by a remote id
public getSerieByRemoteId ( array $remoteId, string $language = null ) : Serie
$remoteId array
$language string
return Serie
Example #1
0
 public function find($keys, $type = 'tv')
 {
     $this->validateKeys($keys);
     $key = 'tvdb' . $keys['imdb'];
     $result = $this->cache($key);
     if (!$result) {
         $result = $this->tvdb_api->getSerieByRemoteId(['imdbid' => $keys['imdb']]);
         $this->cache($key, $result);
     }
     if (!empty($result->id)) {
         return $this->tv($result->id);
     }
     return new Tv();
 }