WeatherReport (weather_report v0.3.0)

Retrieve weather reports from NOAA!

Link to this section Summary

Functions

Gets the most recent forecast for a given station id.

Searches for a station by id.

Searches for stations by state.

Gets the nearest station to a coordinate pair.

Retrieves a list of all available observation stations.

Link to this section Types

Link to this type

forecast_format()

@type forecast_format() :: :rss | :xml | {:raw, :rss} | {:raw, :xml}

Link to this section Functions

Link to this function

get_forecast(station_or_id, type \\ :rss)

Gets the most recent forecast for a given station id.

Link to this function

get_station(station_id)

@spec get_station(String.t()) ::
  {:ok, WeatherReport.Station.t()} | {:error, :not_found}

Searches for a station by id.

Link to this function

get_stations(state)

@spec get_stations(String.t()) :: [WeatherReport.Station.t()]

Searches for stations by state.

Link to this function

nearest_station(lat, long)

@spec nearest_station(float(), float()) :: WeatherReport.Station.t()

Gets the nearest station to a coordinate pair.

@spec station_list() :: [WeatherReport.Station.t()]

Retrieves a list of all available observation stations.