@azure-rest/maps-geolocation package

Interfacce

CountryRegionOutput

Oggetto contenente le informazioni sul paese/area geografica.

ErrorAdditionalInfoOutput

Informazioni aggiuntive sull'errore di gestione delle risorse.

ErrorDetailOutput

Dettagli dell'errore.

ErrorResponseOutput

Risposta di errore comune per tutte le API di Azure Resource Manager per restituire i dettagli dell'errore per le operazioni non riuscite. Questo segue anche il formato di risposta di errore OData.

GeolocationGetLocation200Response

L'API Get IP To Location è una richiesta HTTP GET che, data un indirizzo IP, restituisce il codice paese ISO da cui si trova l'indirizzo IP. Gli sviluppatori possono usare queste informazioni per bloccare o modificare determinati contenuti in base alle posizioni geografiche da cui viene visualizzata l'applicazione.

GeolocationGetLocationDefaultResponse

L'API Get IP To Location è una richiesta HTTP GET che, data un indirizzo IP, restituisce il codice paese ISO da cui si trova l'indirizzo IP. Gli sviluppatori possono usare queste informazioni per bloccare o modificare determinati contenuti in base alle posizioni geografiche da cui viene visualizzata l'applicazione.

GeolocationGetLocationQueryParam
GeolocationGetLocationQueryParamProperties
GetLocation
IpAddressToLocationResultOutput

Questo oggetto viene restituito da una chiamata corretta all'indirizzo IP all'API paese/area geografica

MapsGeolocationClientOptions

Parametri facoltativi per il client

Routes

Alias tipo

GeolocationGetLocationParameters
MapsGeolocationClient

Funzioni

default(AzureKeyCredential, ClientOptions)

Crea un'istanza di MapsGeolocationClient da una chiave di sottoscrizione.

esempio di

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)

Crea un'istanza di MapsGeolocation da un'identità di Azure TokenCredential.

esempio di

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)

Crea un'istanza di MapsGeolocation da un'identità di Azure AzureSASCredential.

esempio di

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)

Dettagli funzione

default(AzureKeyCredential, ClientOptions)

Crea un'istanza di MapsGeolocationClient da una chiave di sottoscrizione.

esempio di

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

Parametri

credential
AzureKeyCredential

Istanza di AzureKeyCredential usata per autenticare le richieste al servizio

options
ClientOptions

Opzioni usate per configurare il client di georilevazione

Restituisce

default(TokenCredential, string, ClientOptions)

Crea un'istanza di MapsGeolocation da un'identità di Azure TokenCredential.

esempio di

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

Parametri

credential
TokenCredential

Istanza tokenCredential usata per autenticare le richieste al servizio

mapsAccountClientId

string

ID client di Mappe di Azure di una risorsa mappa specifica

options
ClientOptions

Opzioni usate per configurare il client di route

Restituisce

default(AzureSASCredential, ClientOptions)

Crea un'istanza di MapsGeolocation da un'identità di Azure AzureSASCredential.

esempio di

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

Parametri

credential
AzureSASCredential

Istanza di AzureSASCredential usata per autenticare le richieste al servizio

options
ClientOptions

Opzioni usate per configurare il client di georilevazione

Restituisce

isUnexpected(GeolocationGetLocation200Response | GeolocationGetLocationDefaultResponse)

function isUnexpected(response: GeolocationGetLocation200Response | GeolocationGetLocationDefaultResponse): response

Parametri

Restituisce

response