openweathermap

package
v0.0.0-...-7efb10f Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 7 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 {
	Key string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(apiKey string) *Client

func (*Client) GetWeather

func (c *Client) GetWeather(lat float64, lon float64) (*WeatherData, error)

type Interface

type Interface interface {
	GetWeather(lat float64, lon float64) (*WeatherData, error)
}

type WeatherData

type WeatherData struct {
	Main    WeatherMain      `json:"main"`
	Weather []WeatherWeather `json:"weather"`
}

type WeatherMain

type WeatherMain struct {
	Temp float64 `json:"temp"`
}

type WeatherWeather

type WeatherWeather struct {
	Description string `json:"description"`
}

Jump to

Keyboard shortcuts

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