class DarkSky::Forecast
- DarkSky::Forecast
- Reference
- Object
Included Modules
- JSON::Serializable
Defined in:
forecast.crConstructors
- .new(latitude : Float64, longitude : Float64, time : Time | Nil = nil, units : String = DEFAULT_UNITS, language : String = DEFAULT_LANUGAGE)
- .new(pull : JSON::PullParser)
Class Method Summary
Instance Method Summary
- #alerts : Array(Alert) | Nil
- #api_calls : Int64 | Nil
-
#at(time : Time | Nil)
set the @time attribute, and request a new batch of results with the new time set.
- #code : Int64 | Nil
- #currently : DataPoint | Nil
- #daily : DataBlock | Nil
- #flags : Flags | Nil
- #hourly : DataBlock | Nil
- #language : String
- #language=(language : String)
- #latitude : Float64
- #longitude : Float64
- #minutely : DataBlock | Nil
- #offset : Float64 | Nil
-
#retreive
Request the HTTP result, returning an instance of Forecast with the values all filled in from the server
- #time : Time | Nil
- #time=(time : Time | Nil)
- #timezone : String | Nil
- #units : String
- #units=(units : String)
Constructor Detail
def self.new(latitude : Float64, longitude : Float64, time : Time | Nil = nil, units : String = DEFAULT_UNITS, language : String = DEFAULT_LANUGAGE)
#
Class Method Detail
Instance Method Detail
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.
def retreive
#
Request the HTTP result, returning an instance of Forecast with the values all filled in from the server