返回值始终相同。我没有返回频道,但是我不知道问题出在哪里
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);
}
});