class DarkSky::Forecast

Included Modules

Defined in:

forecast.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(latitude : Float64, longitude : Float64, time : Time | Nil = nil, units : String = DEFAULT_UNITS, language : String = DEFAULT_LANUGAGE) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]

Class Method Detail

def self.now(latitude, longitude, units = DEFAULT_UNITS, language = DEFAULT_LANUGAGE) #

[View source]

Instance Method Detail

def alerts : Array(Alert) | Nil #

[View source]
def api_calls : Int64 | Nil #

[View source]
def at(time : Time | Nil) #

set the @time attribute, and request a new batch of results with the new time set. This will return a JSONResults::Forecast for the given time.


[View source]
def code : Int64 | Nil #

[View source]
def currently : DataPoint | Nil #

[View source]
def daily : DataBlock | Nil #

[View source]
def flags : Flags | Nil #

[View source]
def hourly : DataBlock | Nil #

[View source]
def language : String #

[View source]
def language=(language : String) #

[View source]
def latitude : Float64 #

[View source]
def longitude : Float64 #

[View source]
def minutely : DataBlock | Nil #

[View source]
def offset : Float64 | Nil #

[View source]
def retreive #

Request the HTTP result, returning an instance of Forecast with the values all filled in from the server


[View source]
def time : Time | Nil #

[View source]
def time=(time : Time | Nil) #

[View source]
def timezone : String | Nil #

[View source]
def units : String #

[View source]
def units=(units : String) #

[View source]