문제

I'm trying to make a call to Youtube Video search endpoint, but I get the error "No filter selected.". What is missing required parameter here?

googleapis
    .discover('youtube', 'v3')
    .execute(function (err, client) {
        var params = {
            part: 'snippet',
            maxResults: 50,
            order: 'viewCount',
            q: 'liverpool'
        };

        var request = client.youtube.videos.list(params).withApiKey('*****');

        request.execute(function (err, response) {
            console.log(err);
            res.send('done');
        });

    });
도움이 되었습니까?

해결책

You should give atleast one filter name for video list as specified here.

example -

var params = {
            part: 'snippet',
            maxResults: 50,
            order: 'viewCount',
            q: 'liverpool',
            chart: 'mostPopular'
};
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top