diff --git a/examples/trip-for-locations.mjs b/examples/trip-for-locations.mjs new file mode 100644 index 0000000..10a3630 --- /dev/null +++ b/examples/trip-for-locations.mjs @@ -0,0 +1,18 @@ +import onebusaway from '../dist/index.mjs'; + +const oba = new onebusaway({ + apiKey: 'TEST', +}); + +// This is initial example for testing the response of the tripsForLocation endpoint +async function main() { + const response = await oba.tripsForLocation.retrieve({ + lat: 47.653, + lon: -122.307, + latSpan: 0.008, + lonSpan: 0.008, + }); + console.log(response.data.list[0].serviceDate); +} + +main();