/** * Constructor * * @param array $params API parameters : token * * @throw Exception */ public function __construct($params = array()) { if (empty($params['token'])) { throw new Exception("Invalid access token"); } $params['url'] = "https://www.googleapis.com/analytics/v3/"; $params['accept'] = "application/json"; parent::__construct($params); }
/** * Constructor * * @param array $params API parameters : key * * @throw Exception */ function __construct($params = array()) { if (empty($params['key'])) { throw new Exception("Invalid API key"); } $params['url'] = "https://www.googleapis.com/youtube/v3/"; $params['accept'] = "application/json"; parent::__construct($params); }
public function __construct($params = array()) { if (empty($params['username']) || empty($params['password'])) { throw new Exception("Username of password undefined"); } $params['url'] = "http://agenda.sowprog.com/rest/v1_2/"; $params['accept'] = "application/json"; parent::__construct($params); }
/** * Constructor * * @param array $params API parameters : token * * @throw Exception */ function __construct($params = array()) { if (empty($params['token'])) { throw new Exception("Missing access token"); } $params['url'] = "https://api.vimeo.com/"; $params['accept'] = "application/json"; $params['authMode'] = "bearer"; parent::__construct($params); }
/** * Constructor * * @param array $params API parameters : client_id * * @throw Exception */ function __construct($params = array()) { if (empty($params['client_id'])) { throw new Exception("Invalid client ID"); } $this->key = $params['client_id']; $params['url'] = "http://api.soundcloud.com/"; $params['accept'] = "application/json"; parent::__construct($params); }
/** * Constructor * * @param array $params API parameters : token * * @throw Exception */ public function __construct($params = array()) { if (empty($params['client_id'])) { throw new Exception("Invalid client id"); } if (empty($params['client_secret'])) { throw new Exception("Invalid client secret"); } if (empty($params['token'])) { $params['token'] = $params['client_id'] . "|" . $params['client_secret']; } $params['url'] = "https://graph.facebook.com/v2.3/"; $params['accept'] = "application/json"; parent::__construct($params); }
public function __construct() { $params = array('url' => "https://itunes.apple.com/", 'accept' => "application/json"); parent::__construct($params); }
/** * Constructor * * @param array $params API parameters : key * * @throw Exception */ function __construct($params = array()) { $params['url'] = "https://api.dailymotion.com/"; $params['accept'] = "application/json"; parent::__construct($params); }
/** * Constructor * * @param array $params API parameters * * @throw Exception */ function __construct($params = array()) { $params['url'] = 'http://api.deezer.com/'; $params['accept'] = 'application/json'; parent::__construct($params); }