function video_filter_oembed_request

cis7 video_filter.module video_filter_oembed_request($endpoint, array $arguments)
cle7 video_filter.module video_filter_oembed_request($endpoint, array $arguments)
elmsmedia7 video_filter.module video_filter_oembed_request($endpoint, array $arguments)
icor7 video_filter.module video_filter_oembed_request($endpoint, array $arguments)
meedjum_blog7 video_filter.module video_filter_oembed_request($endpoint, array $arguments)
mooc7 video_filter.module video_filter_oembed_request($endpoint, array $arguments)

Requests data from an oEmbed provider.

Note: This function currently only supports JSON responses.

@todo Support other response formats than JSON?

Parameters

string $endpoint: The provider endpoint URL.

array $arguments: An associative array of URL arguments to send the provider.

Return value

array|FALSE An array of data if the request is successful, otherwise FALSE.

1 call to video_filter_oembed_request()
video_filter_wistia_html5 in sites/all/modules/ulmus/video_filter/video_filter.codecs.inc
Callback for Wistia codec.

File

sites/all/modules/ulmus/video_filter/video_filter.module, line 631
Video filter is a highly flexible and easy extendable filter module to embed any type of video in your site using a simple tag.

Code

function video_filter_oembed_request($endpoint, array $arguments) {
  // Make HTTP request.
  $result = drupal_http_request(url($endpoint, array('query' => $arguments)));

  if ($data = json_decode($result->data)) {
    // Success.
    return (array) $data;
  }
  else {
    // Failure. Either the resource doesn't exist or there was an error with the
    // request.
    return FALSE;
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.