WIP
This commit is contained in:
parent
977f012ba4
commit
123e09306b
@ -1,13 +1,10 @@
|
||||
|
||||
|
||||
|
||||
(function() {
|
||||
|
||||
const BDC_KEY = "067c718d2bbd4a2ba8d0645e1633cac2";
|
||||
var HttpRequest = Packages.com.gmt2001.HttpRequest,
|
||||
JSONObject = Packages.org.json.JSONObject;
|
||||
|
||||
|
||||
async function fetchSeed(id) {
|
||||
var HttpRequest = Packages.com.gmt2001.HttpRequest,
|
||||
JSONObject = Packages.org.json.JSONObject;
|
||||
let request = HttpRequest.getData(HttpRequest.RequestType.GET,`https://www.geoguessr.com/api/v3/games/${id}`,{},{});
|
||||
if (request.success) {
|
||||
var data = new JSONObject(request.content)
|
||||
@ -15,6 +12,9 @@
|
||||
}
|
||||
};
|
||||
async function getCountryBDC(location) {
|
||||
var HttpRequest = Packages.com.gmt2001.HttpRequest,
|
||||
JSONObject = Packages.org.json.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}`,{},{});
|
||||
if (request.success) {
|
||||
var data = new JSONObject(request.content)
|
||||
|
Loading…
x
Reference in New Issue
Block a user