class CrystalWeather::Types::Conditions

Overview

Conditions represents the weather conditions for a specific location

Defined in:

types/misc.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(data : JSON::Any) #

Creates a new Conditions object based on the data sent by the API


[View source]

Instance Method Detail

def clouds : Int32 #

Clouds percentage in the sky


[View source]
def description : String #

Full description of the conditions


[View source]
def emoji : Char #

Emoji associated to the conditions, based on the CrystalWeather::CONDITION_EMOJIS list


[View source]
def humidity : Int32 #

The percentage of humidity in the air


[View source]
def iconURL : String #

URL to the PNG icon


[View source]
def maximum_temperature : Float64 #

The maximum temperature, for large areas such as megalopolises Uses the same unit as #temperature.


[View source]
def minimum_temperature : Float64 #

The minimum temperature, for large areas such as megalopolises. Uses the same unit as #temperature.


[View source]
def name : String #

Name of the conditions (Rain, snow, clouds...)


[View source]
def pressure : Int32 #

The atmospheric pressure, in hPa (1000 hPa = 1 bar) It is on the sea level, if there is no sea_level or ground_level data


[View source]
def temperature : Float64 #

The temperature. Unit depends on the choosen units format :

  • default : Kelvin
  • metric : Celsius
  • imperial : Fahrenheit

[View source]
def time : Time #

Time of the described conditions


[View source]
def wind_speed : Float64 #

Speed of the wind. Units depends on the choosen units format :

  • default : meter/sec
  • metric : meter/sec
  • imperial : miles/hour

[View source]