class CrystalWeather::Types::City
- CrystalWeather::Types::City
- Reference
- Object
Overview
City
represents the city in which the weather conditions occurs
Defined in:
types/misc.crConstructors
-
.new(name : String, country_code : String, timezone : Int32, sunrise : Int32, sunset : Int32, coordinates : Coordinates)
Creates a new
City
object based on the city_data sent by the API
Instance Method Summary
-
#coordinates : Coordinates
The geolocation of the city
-
#country_code : String
The code of the country in which the city is
-
#name : String
City's name
-
#sunrise : Time
The sunrise time in the city (UTC)
-
#sunset : Time
The sunset time in the city (UTC)
-
#timezone : Int32
The timezone in which the city is (shift in seconds from UTC)
Constructor Detail
def self.new(name : String, country_code : String, timezone : Int32, sunrise : Int32, sunset : Int32, coordinates : Coordinates)
#
Creates a new City
object based on the city_data sent by the API