jquery - How does the `q` parameter work with the YouTube API? -
i have been using youtube's api , confused how q
parameter @ youtube.search().list()
works.
in general adding q
parameter works setting keyword search. however, not adding parameter, api retrieve videos.
where these videos come from? random?
according google documentation:
string
the q parameter specifies query term search for.
your request can use boolean not (-) , or (|) operators exclude videos or find videos associated 1 of several search terms. example, search videos matching either "boating" or "sailing", set q parameter value boating|sailing. similarly, search videos matching either "boating" or "sailing" not "fishing", set q parameter value boating|sailing -fishing. note pipe character must url-escaped when sent in api request. url-escaped value pipe character %7c.
if don't add q
parameter, videos still being search based on other parameters have entered.
Comments
Post a Comment