goweather

package module
v0.0.0-...-8a3f403 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2017 License: MIT Imports: 7 Imported by: 0

README

goweather

A client library of weather.com.cn for golang.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrParseTemperature = errors.New("failed to parse temperature")
)

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager() *Manager

func (*Manager) Fetch

func (m *Manager) Fetch(areaID int32) (info *WeatherInfo, err error)

type WeatherData

type WeatherData struct {
	Date           time.Time
	MinTemperature int
	MaxTemperature int
	Code           string
	Description    string
	CDescription   string
}

type WeatherInfo

type WeatherInfo struct {
	City string
	// UpdateTime time.Time
	Weather []WeatherData
}

Jump to

Keyboard shortcuts

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