wunderground v0.0.3 Wunderground.Query

A collections of types for handling queries to the Weather Underground API.

Link to this section Summary

Types

Shortcode of an airport

City name as a String, where spaces should be replaced by a _

Country as a String

An IPv4 address as a tuple of 4 integers

Latitude as a float

Longitude as a float

An ID of a personal weather station as a string

US state shortform

t()

The different possible Query tuples

US zipcode as an Integer

Link to this section Types

Link to this type airport_code()
airport_code() :: String.t

Shortcode of an airport.

Example

airport_code = "KJFK" # for the John F. Kennedy International Airport
Link to this type city()
city() :: String.t

City name as a String, where spaces should be replaced by a _.

Example

city = "San_Francisco"
Link to this type country()
country() :: String.t

Country as a String.

Example

country = "Australia"
Link to this type ipv4_address()
ipv4_address() :: {non_neg_integer, non_neg_integer, non_neg_integer, non_neg_integer}

An IPv4 address as a tuple of 4 integers.

Example

ipv4_address = {10, 0, 0, 23} # for 10.0.0.23
Link to this type lat()
lat() :: float

Latitude as a float.

Example

lat = 37.8
Link to this type lng()
lng() :: float

Longitude as a float.

Example

lng = -122.4
Link to this type pws_id()
pws_id() :: String.t

An ID of a personal weather station as a string.

Example

pws_id = "KCASANFR70"
Link to this type state()
state() :: String.t

US state shortform.

Example

state = "CA" # for California
Link to this type t()
t ::
  {:us, state, city} |
  {:us_zip, zipcode} |
  {:international, country, city} |
  {:geo, lat, lng} |
  {:airport, airport_code} |
  {:pws, pws_id} |
  {:auto_ip} |
  {:auto_ip, ipv4_address}

The different possible Query tuples.

Link to this type zipcode()
zipcode() :: non_neg_integer

US zipcode as an Integer.

Example

zipcode = 60290 # for Chicago, Illinois