Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 1.5 KB

README.md

File metadata and controls

46 lines (33 loc) · 1.5 KB

go-airly

go-airly is a Go client library for accessing the Airly API

Build Go Report Card

Installation

go-airly is compatible with modern Go releases in module mode, with Go installed:

go get github.com/probakowski/go-airly

will resolve and add the package to the current development module, along with its dependencies.

Alternatively the same can be achieved if you use import in a package:

import "github.com/probakowski/go-airly"

and run go get without parameters.

Finally, to use the top-of-trunk version of this repo, use the following command:

go get github.com/probakowski/go-airly@master

Usage

import "github.com/probakowski/go-airly"

Construct a new Airly client, then you can use different method from API, for example:

client := airly.Client{
Key:        "<your API key>", //required
Language:   "pl",             //optional, options: en, pl, default en
HttpClient: client,           //optional, HTTP client to use, http.DefaultClient will be used if nil
}
installations, err := client.NearestInstallations(airly.Location{Latitude: 50.062006, Longitude: 19.940984})
...