V
V
Vladimir Grabko2016-08-30 08:40:22
YouTube
Vladimir Grabko, 2016-08-30 08:40:22

What is the magic in YouTube's off-library?

This is how it works https://play.golang.org/p/0znpyqXomS
If you add something else to the parameters, everything falls.
Here is a working request

call := service.Search.List("id,snippet").
    Q("test").
    MaxResults(10)

But this one doesn't work
call := service.Search.List("id,snippet").
    Q("test").
    MaxResults(10).
                VideoLicense("any")

Mistake:
Error making search API call: googleapi: Error 400: The request contains an invalid combination of search filters and/or restrictions. Note that you must set the <code>type</code> parameter to <code>video</code> if you set a value for the <code>eventType</code>, <code>videoCaption</code>, <code>videoCategoryId</code>, <code>videoDefinition</code>, <code>videoDimension</code>, <code>videoDuration</code>, <code>videoEmbeddable</code>, <code>videoLicense</code>, <code>videoSyndicated</code>, or <code>videoType</code> parameters., invalidSearchFilter

What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Grabko, 2016-08-30
@VGrabko

I fought for several hours before the question, and as soon as I asked, I had an epiphany. I'm trying to search not only videos but also channels with playlists. Helped to addType("video")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question