【问题标题】:Get multiple streams JSON data from twitch API从 twitch API 获取多个流 JSON 数据
【发布时间】:2015-05-30 16:22:07
【问题描述】:

有两个 json 调用,调用 #2 正在工作。我对第一个(多个流)一无所知。

(我知道你们中的一些人会说:“去那里阅读文档”,但这对我没有多大帮助。https://github.com/justintv/Twitch-API/blob/master/v2_resources/streams.md

调用 #1:

$.getJSON("h ttps://api.twitch.tv/kraken/streams?channel=viagamehs,starladder1.json?callback=", function(response){
    response = JSON.stringify(response);
    OBjonline = jQuery.parseJSON(response);
    alert(response);
});    

调用 #2:

$.getJSON("h ttps://api.twitch.tv/kraken/streams/viagamehs_ru.json?callback=?", function(response){
    response = JSON.stringify(response);
    OBjonline = jQuery.parseJSON(response);
    alert(response);
});

【问题讨论】:

    标签: json twitch


    【解决方案1】:

    正确的代码:

            $.getJSON("https://api.twitch.tv/kraken/streams.json?channel=viagamehs,starladder1&callback=?", function(response){
                response = JSON.stringify(response);
                console.log(response);
            });	 

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-10-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-22
      • 2014-10-09
      • 2021-02-02
      相关资源
      最近更新 更多