airly

package
v0.16.7 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const URL = "https://airapi.airly.eu"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.16.0

type Client struct {
	// contains filtered or unexported fields
}

func NewClient added in v0.16.0

func NewClient(host string) *Client

func (Client) GetInstallation added in v0.16.0

func (c Client) GetInstallation(id uint) (Installation, error)

GetInstallation returns full details about installation with given ID

func (Client) GetMeasurement added in v0.16.0

func (c Client) GetMeasurement(installationId uint) (Measurement, error)

GetAirly queries external API and parses response

func (Client) NearestInstallation added in v0.16.0

func (c Client) NearestInstallation(lat, lon float32) (Installation, error)

NearestInstallation for given location.

type Endpoint

type Endpoint string

type Installation added in v0.16.0

type Installation struct {
	Id        int32
	Latitude  float32
	Longitude float32
}

type Measurement added in v0.16.0

type Measurement struct {
	Caqi        int32
	Humidity    int32
	Temperature float32
	Color       uint32
}

Jump to

Keyboard shortcuts

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