mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-15 04:24:44 +00:00
Generate clients (#206)
This commit is contained in:
17
examples/geocoding/lookup/node/geocodeAnAddress.js
Executable file
17
examples/geocoding/lookup/node/geocodeAnAddress.js
Executable file
@@ -0,0 +1,17 @@
|
||||
import * as geocoding from "m3o/geocoding";
|
||||
|
||||
// Lookup returns a geocoded address including normalized address and gps coordinates. All fields are optional, provide more to get more accurate results
|
||||
async function GeocodeAnAddress() {
|
||||
let geocodingService = new geocoding.GeocodingService(
|
||||
process.env.MICRO_API_TOKEN
|
||||
);
|
||||
let rsp = await geocodingService.lookup({
|
||||
address: "10 russell st",
|
||||
city: "london",
|
||||
country: "uk",
|
||||
postcode: "wc2b",
|
||||
});
|
||||
console.log(rsp);
|
||||
}
|
||||
|
||||
await GeocodeAnAddress();
|
||||
Reference in New Issue
Block a user