@azure-rest/maps-geolocation package

Interfejsy

CountryRegionOutput

Obiekt zawierający informacje o kraju/regionie.

ErrorAdditionalInfoOutput

Dodatkowe informacje o błędzie zarządzania zasobami.

ErrorDetailOutput

Szczegóły błędu.

ErrorResponseOutput

Typowa odpowiedź na błędy dla wszystkich interfejsów API usługi Azure Resource Manager w celu zwrócenia szczegółów błędu dla operacji, które zakończyły się niepowodzeniem. (Jest to również zgodne z formatem odpowiedzi na błąd OData).

GeolocationGetLocation200Response

Interfejs API Get IP To Location to żądanie GET HTTP, które, biorąc pod uwagę adres IP, zwraca kod kraju ISO, z którego znajduje się ten adres IP. Deweloperzy mogą użyć tych informacji, aby zablokować lub zmienić określoną zawartość na podstawie lokalizacji geograficznych, z których aplikacja jest przeglądana.

GeolocationGetLocationDefaultResponse

Interfejs API Get IP To Location to żądanie GET HTTP, które, biorąc pod uwagę adres IP, zwraca kod kraju ISO, z którego znajduje się ten adres IP. Deweloperzy mogą użyć tych informacji, aby zablokować lub zmienić określoną zawartość na podstawie lokalizacji geograficznych, z których aplikacja jest przeglądana.

GeolocationGetLocationQueryParam
GeolocationGetLocationQueryParamProperties
GetLocation
IpAddressToLocationResultOutput

Ten obiekt jest zwracany z pomyślnego wywołania adresu IP do interfejsu API kraju/regionu

MapsGeolocationClientOptions

Opcjonalne parametry klienta

Routes

Aliasy typu

GeolocationGetLocationParameters
MapsGeolocationClient

Funkcje

default(AzureKeyCredential, ClientOptions)

Tworzy wystąpienie elementu MapsGeolocationClient na podstawie klucza subskrypcji.

Przykład

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)

Tworzy wystąpienie usługi MapsGeolocation na podstawie TokenCredentialtożsamości platformy Azure.

Przykład

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)

Tworzy wystąpienie usługi MapsGeolocation na podstawie AzureSASCredentialtożsamości platformy Azure.

Przykład

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)

Szczegóły funkcji

default(AzureKeyCredential, ClientOptions)

Tworzy wystąpienie elementu MapsGeolocationClient na podstawie klucza subskrypcji.

Przykład

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

Parametry

credential
AzureKeyCredential

Wystąpienie azureKeyCredential używane do uwierzytelniania żądań w usłudze

options
ClientOptions

Opcje używane do konfigurowania klienta geolokalizacji

Zwraca

default(TokenCredential, string, ClientOptions)

Tworzy wystąpienie usługi MapsGeolocation na podstawie TokenCredentialtożsamości platformy Azure.

Przykład

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

Parametry

credential
TokenCredential

Wystąpienie TokenCredential używane do uwierzytelniania żądań w usłudze

mapsAccountClientId

string

Identyfikator klienta usługi Azure Maps określonego zasobu mapy

options
ClientOptions

Opcje używane do konfigurowania klienta routingu

Zwraca

default(AzureSASCredential, ClientOptions)

Tworzy wystąpienie usługi MapsGeolocation na podstawie AzureSASCredentialtożsamości platformy Azure.

Przykład

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

Parametry

credential
AzureSASCredential

Wystąpienie AzureSASCredential używane do uwierzytelniania żądań w usłudze

options
ClientOptions

Opcje używane do konfigurowania klienta geolokalizacji

Zwraca

isUnexpected(GeolocationGetLocation200Response | GeolocationGetLocationDefaultResponse)

function isUnexpected(response: GeolocationGetLocation200Response | GeolocationGetLocationDefaultResponse): response

Parametry

Zwraca

response