diff --git a/apps/mirroros.assistant/app.js b/apps/mirroros.assistant/app.js index 62f2359..d78585e 100644 --- a/apps/mirroros.assistant/app.js +++ b/apps/mirroros.assistant/app.js @@ -74,7 +74,7 @@ function loadResultsForQuery(query){ addChatBubble(query+"?",'chat-query'); var url = "http://api.wolframalpha.com/v2/query?input="+query+"&appid="+WOLFRAM_KEY+"&output=json"; var loader = addChatBubble("...",'chat-loading-answer'); - MOS.JSONGetRequest(url,function(result){ + MOS.JSONGetRequest(url,null,function(result){ loader.remove(); var data = printWolframData(result); }); diff --git a/apps/mirroros.home/app.js b/apps/mirroros.home/app.js index c9a86e9..f020181 100644 --- a/apps/mirroros.home/app.js +++ b/apps/mirroros.home/app.js @@ -24,9 +24,9 @@ window.onload = function(){ var apiKey = MOS.getAPIKey("Forecast.io"); if(apiKey){ - MOS.JSONGetRequest("https://maps.googleapis.com/maps/api/browserlocation/json?browser=chromium&sensor=true",function(result){ + MOS.JSONGetRequest("https://maps.googleapis.com/maps/api/browserlocation/json?browser=chromium&sensor=true",null,function(result){ console.log(result); - MOS.JSONGetRequest("https://api.forecast.io/forecast/"+apiKey+"/"+result.location.lat+","+result.location.lng+"?units=si",function(result){ + MOS.JSONGetRequest("https://api.forecast.io/forecast/"+apiKey+"/"+result.location.lat+","+result.location.lng+"?units=si",null,function(result){ var weather = result; var temp = weather.currently.temperature; var summary = weather.currently.summary; diff --git a/apps/mirroros.news/app.js b/apps/mirroros.news/app.js index 21dced7..3197e8f 100644 --- a/apps/mirroros.news/app.js +++ b/apps/mirroros.news/app.js @@ -5,9 +5,9 @@ var articles; window.onload = function(){ emptyContainer = document.getElementById("container").cloneNode(true); - MOS.JSONGetRequest("https://newsapi.org/v1/articles?source=engadget&sortBy=latest&apiKey="+apiKey, function(data1) { - MOS.JSONGetRequest("https://newsapi.org/v1/articles?source=bbc-sport&sortBy=top&apiKey="+apiKey, function(data2) { - MOS.JSONGetRequest("https://newsapi.org/v1/articles?source=associated-press&sortBy=latest&apiKey="+apiKey, function(data3) { + MOS.JSONGetRequest("https://newsapi.org/v1/articles?source=engadget&sortBy=latest&apiKey="+apiKey,null, function(data1) { + MOS.JSONGetRequest("https://newsapi.org/v1/articles?source=bbc-sport&sortBy=top&apiKey="+apiKey,null, function(data2) { + MOS.JSONGetRequest("https://newsapi.org/v1/articles?source=associated-press&sortBy=latest&apiKey="+apiKey,null, function(data3) { articles = mergeArrays({source:"Engadget",data:data1.articles},{source:"BBC Sport",data:data2.articles},{source:"Associated Press",data:data3.articles}); preloadImages(articles); loadNextArticle(); diff --git a/apps/mirroros.tube/index.html b/apps/mirroros.tube/index.html index 52ee3cc..83de2c8 100644 --- a/apps/mirroros.tube/index.html +++ b/apps/mirroros.tube/index.html @@ -49,7 +49,7 @@ var finalQuery = query.replace(/youtube|video of /g, ""); var endpoint = "https://www.googleapis.com/youtube/v3/search"; var params = "?q="+encodeURIComponent(finalQuery)+"&part=snippet&maxResults=1&safeSearch=none&type=video&key="+YOUTUBE_SEARCH_KEY; - MOS.JSONGetRequest(endpoint+params,function(result){ + MOS.JSONGetRequest(endpoint+params,null,function(result){ var yid = result.items[0].id.videoId; var videoTitle = result.items[0].snippet.title; var thumbnail = result.items[0].snippet.thumbnails.medium.url; diff --git a/system/ipc-api.js b/system/ipc-api.js index f1a2cee..fde48f3 100644 --- a/system/ipc-api.js +++ b/system/ipc-api.js @@ -58,10 +58,6 @@ MirrorOS = function(ipc) { } }; - this.JSONGetRequest = function(url,callback){ - this.JSONGetRequest(url,null,callback); - } - this.JSONGetRequest = function(url,headers,callback){ console.log("Calling "+url); var request = new XMLHttpRequest();