WIP
This commit is contained in:
parent
d06fcb7ae2
commit
108fdac4e0
@ -8,7 +8,7 @@
|
|||||||
JSONObject = Packages.org.json.JSONObject,
|
JSONObject = Packages.org.json.JSONObject,
|
||||||
header = new HashMap(0),
|
header = new HashMap(0),
|
||||||
json = new JSONObject('{}');
|
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) {
|
if (request.success) {
|
||||||
var data = new JSONObject(request.content)
|
var data = new JSONObject(request.content)
|
||||||
return data;
|
return data;
|
||||||
@ -21,7 +21,7 @@
|
|||||||
header = new HashMap(0),
|
header = new HashMap(0),
|
||||||
json = new JSONObject('{}');
|
json = new JSONObject('{}');
|
||||||
const BDC_KEY = "067c718d2bbd4a2ba8d0645e1633cac2";
|
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) {
|
if (request.success) {
|
||||||
var data = new JSONObject(request.content)
|
var data = new JSONObject(request.content)
|
||||||
return data.countryCode;
|
return data.countryCode;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user