weather

package
v0.0.0-...-2e7725e Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2017 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Provides a quick weather lookup.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(arg string, ReplyToken string, Client *linebot.Client)

Sends the summary of the forecast to the user.

func Initialize

func Initialize()

Initializes thw initial Weather struct.

Types

type Weather

type Weather struct {
	UpdateURL    string
	Token        string
	LatLongItude string

	Summary        string
	Temp           float32
	Temp_FeelsLike float32
	Humidity       float32 //don't forget make percentage
	CloudCover     float32 //same
	WindSpeed      float32
}

func NewWeather

func NewWeather(token string, latlongitude string) Weather

Creates a new Weather instance with provided token and latitude longitude.

func (*Weather) Update

func (w *Weather) Update(hourAdvance int)

Updates the weather condition.

type WeatherContent

type WeatherContent struct {
	Hourly *WeatherInfo
}

func NewWeatherContent

func NewWeatherContent() WeatherContent

type WeatherData

type WeatherData struct {
	Time                int32
	Summary             string
	Temperature         float32
	ApparentTemperature float32
	Humidity            float32
	CloudCover          float32
	WindSpeed           float32
}

type WeatherInfo

type WeatherInfo struct {
	Summary string
	Data    []*WeatherData
}

Jump to

Keyboard shortcuts

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