Sport Places Example

node v10.15.3
version: 2.0.0
// 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: '', 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;
Created from:

no comments

    sign in to comment