Tag: tvos

通过TVJS-tvOS调用API JSon

我正在尝试使用tvOS,并且在处理json调用方面有一些小问题。 我必须通过一个API获取一些数据,比方说为了testing,我打电话给这个链接 http://query.yahooapis.com/v1/public/yql?q=select%20item%20from%20weather.forecast%20where%20location%3D%223015%22&format=json 我试图用一些修改这个函数 function getDocument(url) { var templateXHR = new XMLHttpRequest(); templateXHR.responseType = "json"; templateXHR.open("GET", url, true); templateXHR.send(); return templateXHR; } 但没有解决。 任何提示或帮助? 如果我需要使用NodeJS,我该怎么做?