diff --git a/twitch/chatguessr.js b/twitch/chatguessr.js index c2d2e52..6cff586 100644 --- a/twitch/chatguessr.js +++ b/twitch/chatguessr.js @@ -8,7 +8,7 @@ JSONObject = Packages.org.json.JSONObject, header = new HashMap(0), json = new JSONObject('{}'); - let request = HttpRequest.getData(HttpRequest.RequestType.GET,`https://www.geoguessr.com/api/v3/games/${id}`,json.toString(),header); + var request = HttpRequest.getData(HttpRequest.RequestType.GET,'https://www.geoguessr.com/api/v3/games/'+id,json.toString(),header); if (request.success) { var data = new JSONObject(request.content) return data; @@ -21,7 +21,7 @@ header = new HashMap(0), json = new JSONObject('{}'); const BDC_KEY = "067c718d2bbd4a2ba8d0645e1633cac2"; - let request = HttpRequest.getData(HttpRequest.RequestType.GET,`https://api.bigdatacloud.net/data/reverse-geocode?latitude=${location.lat}&longitude=${location.lng}&key=${BDC_KEY}`,json.toString(),header); + var request = HttpRequest.getData(HttpRequest.RequestType.GET,'https://api.bigdatacloud.net/data/reverse-geocode?latitude='+location.lat+'&longitude='+location.lng+'&key='+BDC_KEY,json.toString(),header); if (request.success) { var data = new JSONObject(request.content) return data.countryCode;