dsclient

package
v0.0.0-...-c6e3130 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(apiKey string) (*Client, error)

func (*Client) Forecast

func (c *Client) Forecast(lat, long float64) (*Response, error)

type DataBlock

type DataBlock struct {
	Data    []DataPoint `json:"data"`
	Summary string      `json:"summary"`
	Icon    string      `json:"icon"`
}

type DataPoint

type DataPoint struct {
	ApparentTemp float64 `json:"apparentTemperature"`
}

type Response

type Response struct {
	Latitude  float64   `json:"latitude"`
	Longitude float64   `json:"longitude"`
	Timezone  string    `json:"timezone"`
	Currently DataPoint `json:"currently"`
	Minutely  DataBlock `json:"minutely"`
	Hourly    DataBlock `json:"hourly"`
	Daily     DataBlock `json:"daily"`
}

Jump to

Keyboard shortcuts

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