cbc yt api query

Description

Fires on every request made to the YouTube Data API. Useful for logging or tracking API quota usage.

Parameters

$url
(string)(optional) The YouTube API endpoint URL requested.

Default:None
$request_units
(int)(optional) Number of API quota units consumed by the request.

Default:None

Example

add_action( 'cbc_yt_api_query', function( $url, $units ) {
    error_log( "YouTube API: {$units} units - {$url}" );
}, 10, 2 );

Start importing in minutes

Bring your YouTube content into WordPress and let it update itself. Includes automatic updates and support.