Skip to content

Commit 2b812aa

Browse files
author
Jim
committed
Updated a few calls to allow parameter passing. Also changed library constructors to comply with current CI standards
1 parent cf79f1e commit 2b812aa

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

libraries/Google_oauth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class Google_oauth
5959
*
6060
* @param array $params
6161
*/
62-
public function google_oauth($params)
62+
public function __construct($params)
6363
{
6464
$this->CI =& get_instance();
6565
$this->CI->load->helper('oauth');

libraries/Youtube.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class Youtube
7777
* @param string $clientId The clientId issued by the YouTube dashboard
7878
* @param string $developerKey The developerKey issued by the YouTube dashboard
7979
*/
80-
public function youtube($params)
80+
public function __construct($params)
8181
{
8282
if(isset($params['apikey']))$this->_header['X-GData-Key'] = 'key='.$params['apikey'];
8383
$this->CI =& get_instance();
@@ -396,9 +396,9 @@ public function getUserFavorites($user = 'default', array $params = array())
396396
return $this->_response_request("/{$this->_uris['USER_URI']}/{$user}/favorites", array_merge(array('start-index'=>1, 'max-results'=>10), $params));
397397
}
398398

399-
public function getUserProfile($user = 'default')
399+
public function getUserProfile($user = 'default', array $params = array())
400400
{
401-
return $this->_response_request("/{$this->_uris['USER_URI']}/{$user}");
401+
return $this->_response_request("/{$this->_uris['USER_URI']}/{$user}", array_merge(array('v'=>self::API_VERSION), $params));
402402
}
403403

404404
public function getUserActivity($user = 'default', array $params = array())
@@ -411,9 +411,9 @@ public function getUserActivity($user = 'default', array $params = array())
411411
*
412412
* @return the youtube response xml.
413413
**/
414-
public function getInboxFeedForCurrentUser()
414+
public function getInboxFeedForCurrentUser(array $params = array())
415415
{
416-
if($this->_access !== false)return $this->_response_request ("/{$this->_uris['INBOX_FEED_URI']}");
416+
if($this->_access !== false)return $this->_response_request ("/{$this->_uris['INBOX_FEED_URI']}", array_merge(array('v'=>self::API_VERSION), $params));
417417
else return false;
418418
}
419419

spark.info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
name: youtube
2-
version: 1.1.0
2+
version: 1.1.1
33
compatibility: 2.0.3
44
tags: ["youtube", "youtube api", "google oauth", "api"]

0 commit comments

Comments
 (0)