I'm getting the following error:
I20151214-16:56:33.283(1)? { [Error: No filter selected.]
I20151214-16:56:33.283(1)? code: 400,
I20151214-16:56:33.283(1)? errors:
I20151214-16:56:33.283(1)? [ { domain: 'youtube.parameter',
I20151214-16:56:33.283(1)? reason: 'missingRequiredParameter',
I20151214-16:56:33.283(1)? message: 'No filter selected.',
I20151214-16:56:33.283(1)? locationType: 'parameter',
I20151214-16:56:33.284(1)? location: '' } ] }
When I do this:
var data = {
auth: this.oauth2Client,
part: "snippet"
};
this.yt.playlists.list(data, function(err, res){
console.log("===== playlists ======");
console.log(err);
console.log(res);
console.log("==== playlists ======")
});
What does "No filter selected mean" and how do I fix it?
To fix this error I had to specify that I wanted to retrieve my own playlists. By default, it doesn't know if I want a specific playlist or all playlists.
var data = {
auth: this.oauth2Client,
part: "snippet",
mine: true //this
};
Playlists: list
Returns a collection of playlists that match the API request parameters. For example, you can retrieve all playlists that the authenticated user owns, or you can retrieve one or more playlists by their unique IDs