Dela via


@azure-rest/maps-geolocation package

Gränssnitt

CountryRegionOutput

Objektet som innehåller information om land/region.

ErrorAdditionalInfoOutput

Ytterligare information om resurshanteringsfelet.

ErrorDetailOutput

Felinformationen.

ErrorResponseOutput

Vanligt felsvar för alla Azure Resource Manager-API:er för att returnera felinformation för misslyckade åtgärder. (Detta följer även formatet för OData-felsvar.).

GeolocationGetLocation200Response

Get IP To Location-API:et är en HTTP-GET begäran som, givet en IP-adress, returnerar ISO-landskoden som IP-adressen finns från. Utvecklare kan använda den här informationen för att blockera eller ändra visst innehåll baserat på geografiska platser där programmet visas.

GeolocationGetLocationDefaultResponse

Get IP To Location-API:et är en HTTP-GET begäran som, givet en IP-adress, returnerar ISO-landskoden som IP-adressen finns från. Utvecklare kan använda den här informationen för att blockera eller ändra visst innehåll baserat på geografiska platser där programmet visas.

GeolocationGetLocationQueryParam
GeolocationGetLocationQueryParamProperties
GetLocation
IpAddressToLocationResultOutput

Det här objektet returneras från ett lyckat anrop till IP-adressen till lands-/region-API:et

MapsGeolocationClientOptions

Valfria parametrar för klienten

Routes

Typalias

GeolocationGetLocationParameters
MapsGeolocationClient

Funktioner

default(AzureKeyCredential, ClientOptions)

Skapar en instans av MapsGeolocationClient från en prenumerationsnyckel.

Exempel

import { AzureKeyCredential } from "@azure/core-auth";
import MapsGeolocation from "@azure-rest/maps-geolocation";

const credential = new AzureKeyCredential("<subscription-key>");
const client = MapsGeolocation(credential);
default(TokenCredential, string, ClientOptions)

Skapar en instans av MapsGeolocation från en Azure Identity-TokenCredential.

Exempel

import { DefaultAzureCredential } from "@azure/identity";
import MapsGeolocation from "@azure-rest/maps-geolocation";

const credential = new DefaultAzureCredential();
const client = MapsGeolocation(credential, "<maps-account-client-id>");
default(AzureSASCredential, ClientOptions)

Skapar en instans av MapsGeolocation från en Azure Identity-AzureSASCredential.

Exempel

import { AzureSASCredential } from "@azure/core-auth";
import MapsGeolocation from "@azure-rest/maps-geolocation";

const credential = new AzureSASCredential("<SAS Token>");
const client = MapsGeolocation(credential);
isUnexpected(GeolocationGetLocation200Response | GeolocationGetLocationDefaultResponse)

Funktionsinformation

default(AzureKeyCredential, ClientOptions)

Skapar en instans av MapsGeolocationClient från en prenumerationsnyckel.

Exempel

import { AzureKeyCredential } from "@azure/core-auth";
import MapsGeolocation from "@azure-rest/maps-geolocation";

const credential = new AzureKeyCredential("<subscription-key>");
const client = MapsGeolocation(credential);
function default(credential: AzureKeyCredential, options?: ClientOptions): MapsGeolocationClient

Parametrar

credential
AzureKeyCredential

En AzureKeyCredential-instans som används för att autentisera begäranden till tjänsten

options
ClientOptions

Alternativ som används för att konfigurera geoplatsklienten

Returer

default(TokenCredential, string, ClientOptions)

Skapar en instans av MapsGeolocation från en Azure Identity-TokenCredential.

Exempel

import { DefaultAzureCredential } from "@azure/identity";
import MapsGeolocation from "@azure-rest/maps-geolocation";

const credential = new DefaultAzureCredential();
const client = MapsGeolocation(credential, "<maps-account-client-id>");
function default(credential: TokenCredential, mapsAccountClientId: string, options?: ClientOptions): MapsGeolocationClient

Parametrar

credential
TokenCredential

En TokenCredential-instans som används för att autentisera begäranden till tjänsten

mapsAccountClientId

string

Azure Maps-klient-ID för en specifik kartresurs

options
ClientOptions

Alternativ som används för att konfigurera routningsklienten

Returer

default(AzureSASCredential, ClientOptions)

Skapar en instans av MapsGeolocation från en Azure Identity-AzureSASCredential.

Exempel

import { AzureSASCredential } from "@azure/core-auth";
import MapsGeolocation from "@azure-rest/maps-geolocation";

const credential = new AzureSASCredential("<SAS Token>");
const client = MapsGeolocation(credential);
function default(credential: AzureSASCredential, options?: ClientOptions): MapsGeolocationClient

Parametrar

credential
AzureSASCredential

En AzureSASCredential-instans som används för att autentisera begäranden till tjänsten

options
ClientOptions

Alternativ som används för att konfigurera geoplatsklienten

Returer

isUnexpected(GeolocationGetLocation200Response | GeolocationGetLocationDefaultResponse)

function isUnexpected(response: GeolocationGetLocation200Response | GeolocationGetLocationDefaultResponse): response

Parametrar

Returer

response