Full ELMS Learning Network documentation
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;
}
}