You are here

function emvideo_youtube_request in Embedded Media Field 6

this is a wrapper for emvideo_request_xml that includes youtube's api key

1 call to emvideo_youtube_request()
emvideo_youtube_data in contrib/emvideo/providers/youtube.inc
hook emfield_PROVIDER_data

File

contrib/emvideo/providers/youtube.inc, line 298
This include processes youtube.com media files for use by emfield.module.

Code

function emvideo_youtube_request($code, $cached = TRUE) {
  $args['dev_id'] = trim(variable_get('emvideo_youtube_api_key', ''));
  $args['method'] = $method;

  // if we've got a secret sign the arguments
  // TODO: doesn't seem to matter
  //  if ($secret = trim(variable_get('emvideo_youtube_api_secret', ''))) {
  //    $args['api_sig'] = md5($secret . $arghash);
  //  }
  $request = module_invoke('emfield', 'request_xml', 'youtube', EMVIDEO_YOUTUBE_REST_ENDPOINT . '/' . $code, array(
    'video' => $code,
  ), $cached);
  return $request;
}