/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { geocodingGeocode } from "../funcs/geocodingGeocode.js"; import { geocodingIp2Country } from "../funcs/geocodingIp2Country.js"; import { geocodingPositionToCountry } from "../funcs/geocodingPositionToCountry.js"; import { geocodingRetrieveNearestPlaces } from "../funcs/geocodingRetrieveNearestPlaces.js"; import { geocodingReverseGeocode } from "../funcs/geocodingReverseGeocode.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Geocoding extends ClientSDK { /** * Geocoding_International_Geocode * * @remarks * Returns the WGS84 latitude and longitude for the given location. Supports most international locations. */ async geocode( request: operations.GeocodingInternationalGeocodeRequest, options?: RequestOptions, ): Promise { return unwrapAsync(geocodingGeocode( this, request, options, )); } /** * Geocoding_International_PositionToCountry * * @remarks * Returns the country based on the WGS84 latitude and longitude supplied. No result is returned if the coordinates are in international waters. */ async positionToCountry( request: operations.GeocodingInternationalPositionToCountryRequest, options?: RequestOptions, ): Promise { return unwrapAsync(geocodingPositionToCountry( this, request, options, )); } /** * Geocoding_International_RetrieveNearestPlaces * * @remarks * Calculates the nearest places of interest of a given category to a given location. */ async retrieveNearestPlaces( request: operations.GeocodingInternationalRetrieveNearestPlacesRequest, options?: RequestOptions, ): Promise { return unwrapAsync(geocodingRetrieveNearestPlaces( this, request, options, )); } /** * Geocoding_International_ReverseGeocode * * @remarks * Returns the nearest address or location to the given coordinates. */ async reverseGeocode( request: operations.GeocodingInternationalReverseGeocodeRequest, options?: RequestOptions, ): Promise { return unwrapAsync(geocodingReverseGeocode( this, request, options, )); } /** * Extras_Web_Ip2Country * * @remarks * Translates an IP address to a country. This product includes GeoLite2 data created by MaxMind, available from http://www.maxmind.com */ async ip2Country( request?: operations.ExtrasWebIp2CountryRequest | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(geocodingIp2Country( this, request, options, )); } }