Skip to content

Instantly share code, notes, and snippets.

@heri
Created December 12, 2019 21:15
Show Gist options
  • Save heri/5fcebe22afda77ff78713f59bde04a33 to your computer and use it in GitHub Desktop.
Save heri/5fcebe22afda77ff78713f59bde04a33 to your computer and use it in GitHub Desktop.
var my_sports_keyword = "Hiking";
var getSports = await getJSON("https://sports.api.decathlon.com/sports/search/" + my_sports_keyword +"?coordinates=" + latLng);
var sport = getSports[0];
console.log("Found sport " + sport["attributes"]["name"] + " with sport_id " + sport["id"] + " for " + my_sports_keyword);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment