class CrystalWeather::Types::City

Overview

City represents the city in which the weather conditions occurs

Defined in:

types/misc.cr

Constructors

Instance Method Summary

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


[View source]

Instance Method Detail

def coordinates : Coordinates #

The geolocation of the city


[View source]
def country_code : String #

The code of the country in which the city is


[View source]
def name : String #

City's name


[View source]
def sunrise : Time #

The sunrise time in the city (UTC)


[View source]
def sunset : Time #

The sunset time in the city (UTC)


[View source]
def timezone : Int32 #

The timezone in which the city is (shift in seconds from UTC)


[View source]