mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
20 lines
494 B
JavaScript
Executable File
20 lines
494 B
JavaScript
Executable File
import * as evchargers from "m3o/evchargers";
|
|
|
|
// Search by giving a coordinate and a max distance, or bounding box and optional filters
|
|
async function SearchByLocation() {
|
|
let evchargersService = new evchargers.EvchargersService(
|
|
process.env.MICRO_API_TOKEN
|
|
);
|
|
let rsp = await evchargersService.search({
|
|
distance: 2000,
|
|
location: {
|
|
latitude: 51.53336351319885,
|
|
longitude: -0.0252,
|
|
},
|
|
max_results: 2,
|
|
});
|
|
console.log(rsp);
|
|
}
|
|
|
|
await SearchByLocation();
|