Options
All
  • Public
  • Public/Protected
  • All
Menu

AssemblyScript class representation of the Fastly Geolocation JSON Object.

The classes uses ES getter functions to access the Geolocation properties that will: A. Return the value (or primitive value wrapper) of the JSON key if it exists, or B. Return null if the key does not exist

Hierarchy

  • Geolocation

Index

Constructors

constructor

Properties

Private jsonObj

jsonObj: Obj

Accessors

area_code

  • The telephone area code associated with an IP address.

    These are only available for IP addresses in the United States, its territories, and Canada.

    Returns null | GeolocationPrimitive<number>

as_name

  • get as_name(): null | string
  • The name of the organization associated with as_number.

    For example, fastly is the value given for IP addresses under AS-54113.

    Returns null | string

as_number

city

  • get city(): null | string
  • City or town name.

    Returns null | string

conn_speed

  • get conn_speed(): null | string
  • Connection speed.

    Returns null | string

conn_type

  • get conn_type(): null | string
  • Connection type.

    Returns null | string

continent

  • get continent(): null | string
  • Continent.

    Returns null | string

country_code

  • get country_code(): null | string
  • A two-character ISO 3166-1 country code for the country associated with an IP address.

    The US country code is returned for IP addresses associated with overseas United States military bases.

    These values include subdivisions that are assigned their own country codes in ISO 3166-1. For example, subdivisions NO-21 and NO-22 are presented with the country code SJ for Svalbard and the Jan Mayen Islands.

    Returns null | string

country_code3

  • get country_code3(): null | string
  • A three-character ISO 3166-1 alpha-3 country code for the country associated with the IP address.

    The USA country code is returned for IP addresses associated with overseas United States military bases.

    Returns null | string

country_name

  • get country_name(): null | string
  • Country name.

    This field is the ISO 3166-1 English short name for a country.

    Returns null | string

gmt_offset

  • get gmt_offset(): null | string
  • Time zone offset from Greenwich Mean Time (GMT) for city.

    Returns null | string

latitude

  • Latitude, in units of degrees from the equator.

    Values range from -90.0 to +90.0 inclusive, and are based on the WGS 84 coordinate reference system.

    Returns null | GeolocationPrimitive<number>

longitude

metro_code

  • Metro code, representing designated market areas (DMAs) in the United States.

    Returns null | GeolocationPrimitive<number>

postal_code

  • get postal_code(): null | string
  • The postal code associated with the IP address.

    These are available for some IP addresses in Australia, Canada, France, Germany, Italy, Spain, Switzerland, the United Kingdom, and the United States.

    For Canadian postal codes, this is the first 3 characters. For the United Kingdom, this is the first 2-4 characters (outward code). For countries with alphanumeric postal codes, this field is a lowercase transliteration.

    Returns null | string

proxy_description

  • get proxy_description(): null | string
  • Client proxy description.

    Returns null | string

proxy_type

  • get proxy_type(): null | string
  • Client proxy type.

    Returns null | string

region

  • get region(): null | string
  • ISO 3166-2 country subdivision code.

    For countries with multiple levels of subdivision (for example, nations within the United Kingdom), this variable gives the more specific subdivision.

    This field can be None for countries that do not have ISO country subdivision codes. For example, None is given for IP addresses assigned to the Ă…land Islands (country code AX, illustrated below).

    Returns null | string

utc_offset

  • Time zone offset from coordinated universal time (UTC) for city.

    Returns null | GeolocationPrimitive<number>

Legend

  • Constructor
  • Private property

Generated using TypeDoc