Skip to content

murilobsd/cptec

Repository files navigation

gocptec

Weather data for geekers

GoDoc Go Report Card Coverage Status Build Status License

Go Cptec is an INPE/CPTEC weather data parser. The data range from weather stations, given (temperature, rain, etc.), alerts, forecast.

The project has no link with INPE/CPTEC.

Table of Contents

Features

  • Station list
  • Weather data
  • Forecast

Installing

From source (always latest)

Make sure to have go (1.9+) installed, then do:

go get -u github.com/murilobsd/cptec

Usage

Get stations:

cptec := cptec.New(nil)
stations, err := cptec.Station.GetAll()
if err != nil {
    fmt.Printf("Error: %v\n", err)
    return
}

for _, station := range stations {
    fmt.Println(station)
}

# Output
# ID: 32549 - UF: TO - Locality: UHE Isamu Ikeda Montante
# ID: 32619 - UF: TO - Locality: Xambioa

License

Released under the BSD license.

Releases

No releases published

Packages

No packages published