diff --git a/src/client.ts b/src/client.ts index 41e40fd..4513a31 100644 --- a/src/client.ts +++ b/src/client.ts @@ -206,6 +206,25 @@ export class Client { geolocate(request: GeolocateRequest): Promise { return geolocate(request, this.axiosInstance); } + /** + * An example use of this function. + * + * ```javascript + * import { Client } from '@googlemaps/google-maps-services-js'; + * + * const args = { + * params: { + * key: '', + * address: 'Perth 4WD & Commercial Centre', + * } + * }; + * const client = new Client(); + * client.geocode(args).then(gcResponse => { + * const str = JSON.stringify(gcResponse.data.results[0]); + * console.log(`First result is: ${str}`);) + * }); + * ``` + */ geocode(request: GeocodeRequest): Promise { return geocode(request, this.axiosInstance); }