/** * @param array $options Class instances / Echo to cli? */ public function __construct(array $options = []) { parent::__construct($options); $this->rageqty = $this->pdo->getSetting('maxrageprocessed') != '' ? $this->pdo->getSetting('maxrageprocessed') : 75; $this->xmlEpisodeInfoUrl = "http://services.tvrage.com/myfeeds/episodeinfo.php?key=" . TvRage::APIKEY; $this->imgSavePath = nZEDb_COVERS . 'tvrage' . DS; }
/** * Construct. Set up API key. * * @param array $options Class instances. * * @access public */ public function __construct(array $options = []) { parent::__construct($options); $this->clientId = $this->pdo->getSetting('trakttvclientkey'); $this->requestHeaders = ['Content-Type: application/json', 'trakt-api-version: 2', 'trakt-api-key: ' . $this->clientId, 'Content-Length: 0']; $this->client = new TraktAPI($this->requestHeaders); $this->time = new Time(); }
/** * @param array $options Class instances / Echo to cli? */ public function __construct(array $options = []) { parent::__construct($options); $this->client = new Client(self::TVDB_URL, self::TVDB_API_KEY); $this->posterUrl = self::TVDB_URL . DS . 'banners/_cache/posters/%s-1.jpg'; $this->fanartUrl = self::TVDB_URL . DS . 'banners/_cache/fanart/original/%s-1.jpg'; $this->imgSavePath = nZEDb_COVERS . 'tvshows' . DS; $this->serverTime = $this->client->getServerTime(); $this->timeZone = new \DateTimeZone('UTC'); $this->timeFormat = 'Y-m-d H:i:s'; }
/** * @param array $options Class instances / Echo to cli? */ public function __construct(array $options = []) { parent::__construct($options); $this->client = new Client(self::TVDB_URL, self::TVDB_API_KEY); $this->posterUrl = self::TVDB_URL . DS . 'banners/_cache/posters/%s-1.jpg'; $this->fanartUrl = self::TVDB_URL . DS . 'banners/_cache/fanart/original/%s-1.jpg'; $this->local = false; // Check if we can get the time for API status // If we can't then we set local to true try { $this->serverTime = $this->client->getServerTime(); } catch (CurlException $error) { if (strpos($error->getMessage(), 'Cannot fetch') === 0) { echo $this->pdo->log->warning('Could not reach TVDB API. Running in local mode only!'); $this->local = true; } } catch (XmlException $error) { if (strpos($error->getMessage(), 'Error in file') === 0) { echo $this->pdo->log->warning('Bad response from TVDB API. Running in local mode only!'); $this->local = true; } } }
/** * @param array $options Class instances / Echo to cli? */ public function __construct(array $options = []) { parent::__construct($options); $this->xmlEpisodeInfoUrl = "http://services.tvrage.com/myfeeds/episodeinfo.php?key=" . TvRage::APIKEY; $this->imgSavePath = nZEDb_COVERS . 'tvrage' . DS; }
/** * Construct. Instanciate TVMaze Client Class * * @param array $options Class instances. * * @access public */ public function __construct(array $options = []) { parent::__construct($options); $this->client = new Client(); }
/** * Construct. Set up API key. * * @param array $options Class instances. * * @access public */ public function __construct(array $options = []) { parent::__construct($options); $this->client = new TraktAPI(['clientID' => $this->pdo->getSetting('trakttvclientkey')]); }
/** * Construct. Instantiate TMDB Class * * @param array $options Class instances. * * @access public */ public function __construct(array $options = []) { parent::__construct($options); $this->client = new TmdbAPI($this->pdo->getSetting('tmdbkey')); }