@@ -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
0 commit comments