apixu

package
v0.0.0-...-cb77e8e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config string

Config represents apixu API configuration (just the API key) from which a weather.Provider can be built.

func New

func New(apiKey string) Config

New creates a new Apixu API configuration.

func (Config) Query

func (c Config) Query(q string) weather.Provider

Query queries Apixu using zip code, lat/lon, city name, etc. (see https://www.apixu.com/doc/request.aspx)

type Provider

type Provider string

Provider wraps an Apixu API url so that it can be used as a weather.Provider.

func (Provider) GetWeather

func (apixuProvider Provider) GetWeather() (weather.Weather, error)

GetWeather gets weather information from Apixu.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL