Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,23 @@
# Licensed under the MIT License.
# ------------------------------------

from typing import Optional

class CountryRegionResult(object):
"""Represents coordinate latitude and longitude

:keyword ip_address:
The IP Address of the request.
:paramtype ip_address: str
:paramtype ip_address: Optional[str]
:keyword iso_code: iso_code:
The IP Address's 2-character code of the country or region.
Please note, IP address in ranges reserved for special purpose will return Null for country/region.
:paramtype iso_code: str
:paramtype iso_code: Optional[str]
"""
def __init__(
self,
ip_address: str = None,
iso_code: str = None
ip_address: Optional[str] = None,
iso_code: Optional[str] = None
):
self.ip_address = ip_address
self.iso_code = iso_code
1 change: 0 additions & 1 deletion sdk/maps/azure-maps-geolocation/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[tool.azure-sdk-build]
pyright = false
type_check_samples = false
verifytypes = false
ci_enabled = false
strict_sphinx = true
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async def authentication_maps_service_client_with_subscription_key_credential_as
from azure.core.credentials import AzureKeyCredential
from azure.maps.geolocation.aio import MapsGeolocationClient

subscription_key = os.getenv("AZURE_SUBSCRIPTION_KEY")
subscription_key = os.getenv("AZURE_SUBSCRIPTION_KEY") or "your subscription key"

maps_geolocation_client = MapsGeolocationClient(credential=AzureKeyCredential(subscription_key))
# [END create_maps_geolocation_service_client_with_key_async]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import asyncio
import os

subscription_key = os.getenv("AZURE_SUBSCRIPTION_KEY")
subscription_key = os.getenv("AZURE_SUBSCRIPTION_KEY") or "your subscription key"

async def get_country_code_async():
# [START get_country_code_async]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def authentication_maps_service_client_with_subscription_key_credential():
from azure.core.credentials import AzureKeyCredential
from azure.maps.geolocation import MapsGeolocationClient

subscription_key = os.getenv("AZURE_SUBSCRIPTION_KEY")
subscription_key = os.getenv("AZURE_SUBSCRIPTION_KEY") or "your subscription key"

maps_geolocation_client = MapsGeolocationClient(credential=AzureKeyCredential(subscription_key))
# [END create_maps_geolocation_service_client_with_key]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import os

subscription_key = os.getenv("AZURE_SUBSCRIPTION_KEY")
subscription_key = os.getenv("AZURE_SUBSCRIPTION_KEY") or "your subscription key"

def get_country_code():
# [START get_country_code]
Expand Down