来自CMS帐户的Youtube Data API PHP频道列表查询

Followup question to an answer posted to a question I asked about the Youtube Analytics API

Per the answer to the question above I'm trying to query the Youtube Data API using the Google PHP API Client v0.6.1 (latest currently available as of Apr 4th, 2013)

My code looks like this:

try { 
    $channelsResponse = $youtube->channels->listChannels('snippet,contentDetails', 
        array("managedByMe"=>"true", "maxResults"=>50, "onBehalfOfContentOwner"=>$youtube_partner_code));
} catch (Exception $e){
    return print "

Channel list failed: ".$e->getMessage()."

";
}

But I'm getting the following exception message thrown:

Channel list failed: (list) unknown parameter: 'managedByMe'

Is there something wrong with how I've formatted the parameters in the code above, or is it the case that this version of the PHP Client library does not yet support parameters in the experimental Youtbe Data V3 api?

My query works when I try it using the API Explorer on the Youtube Channel List doc.

The current YouTube Data API v3 service definition file packaged with the PHP client library doesn't have support for that new parameter. I will ping the maintainer of the library and ask him to regenerate the service definition to pick up the newest parameters defined in the API's discovery document.

Other Google APIs client libraries have ways of explicitly setting parameters that aren't recognized by the service definition, but I'm not aware of any way to do that using the PHP client library. I'll ask around and if I come up with one, I'll update this answer.