Sport Places Example

node v10.24.1
version: 2.0.0
endpointsharetweet
// Fetch API Polyfill for Node (Should work without this on the browser) const fetch = require("node-fetch"); // Returns all the places where you can practice tennis in Montreal let sportplaces = { base_url: 'https://sportplaces.api.decathlon.com/api/v1/places', coordinates: '-73.582,45.511', radius: 30, sport_id: 175 } let response = await fetch(`${sportplaces.base_url}?origin=${sportplaces.coordinates}&radius=${sportplaces.radius}&sports=${sportplaces.sport_id}`) let data = await response.json(); // Print out GeoJSON data on RunKit data.data;
Created from: https://developers.decathlon.com/en/
Loading…

no comments

    sign in to comment