youtube videoCategories api相关问题

时间:2019-05-14 05:42:20

标签: javascript google-api youtube-api

返回值始终相同。我没有返回频道,但是我不知道问题出在哪里

var url = "https://www.googleapis.com/youtube/v3/videoCategories?"
var optionParams = {
  part: "snippet",
  key: "my key",
  regionCode: "KR",
};

optionParams.q = encodeURI(optionParams.q);

for (var option in optionParams) {
  url += option + "=" + optionParams[option] + "&";
}

jQuery.ajax(url, {
  dataType: 'json',
  success: function(response) {
    console.log(response);
  }
});

0 个答案:

没有答案