You are here

function _video_apiclient_youtube_init in Video 6.2

function to include necessary Zend Gdata libraries.

2 calls to _video_apiclient_youtube_init()
_video_apiclient_youtube_gdata in includes/apiclient.inc
_video_upload_gdata_authenticate_youtube in includes/apiclient.inc
Authenticate YouTube user account.

File

includes/apiclient.inc, line 144
Some functions for using video hosting providers api (Youtube, Google Video, etc..) Part of this code has been inspired by the video_cck module and adapted for the video module by jyamada1

Code

function _video_apiclient_youtube_init($op) {

  // Include Zend loader class.
  _video_upload_gdata_set_include_path();

  //TODO :  move Zend to the library folder
  if (@(include_once 'Zend/Loader.php')) {
    switch ($op) {
      case 'authenticate':
        Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
        break;
      case 'youtube':
        Zend_Loader::loadClass('Zend_Gdata_YouTube');
        break;
    }
    return TRUE;
  }
  else {
    watchdog('youtbe_video', "Couldn't find the Zend client libraries.", array(), WATCHDOG_ERROR);
  }
}