mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-12 19:25:16 +00:00
23 lines
615 B
JavaScript
Executable File
23 lines
615 B
JavaScript
Executable File
const { EvchargersService } = require("m3o/evchargers");
|
|
|
|
// Search by giving a coordinate and a max distance, or bounding box and optional filters
|
|
async function searchByBoundingBox() {
|
|
let evchargersService = new EvchargersService(process.env.MICRO_API_TOKEN);
|
|
let rsp = await evchargersService.search({
|
|
box: {
|
|
bottom_left: {
|
|
latitude: 51.52627543859447,
|
|
longitude: -0.03635349400295168,
|
|
},
|
|
top_right: {
|
|
latitude: 51.56717121807993,
|
|
longitude: -0.002293530559768285,
|
|
},
|
|
},
|
|
max_results: 2,
|
|
});
|
|
console.log(rsp);
|
|
}
|
|
|
|
searchByBoundingBox();
|