Functions

  location_detect_nearest_city_finish (result)
  location_get_world ()
  location_level_to_string (level)
  sky_to_string (sky)
  sky_to_string_full (sky, options)
  temperature_unit_to_real (unit)
  timezone_get_by_tzid (tzid)
  timezone_get_utc ()
  wind_direction_to_string (wind)
  wind_direction_to_string_full (wind, options)

Details

GWeather.location_detect_nearest_city_finish(result)
Parameters:result (Gio.AsyncResult) –
Raises:GLib.Error
Return type:GWeather.Location
GWeather.location_get_world()
Returns:a GWeather.LocationLevel.WORLD location, or None if Locations.xml could not be found or could not be parsed. The return value is owned by libgweather and should not be modified or freed.
Return type:GWeather.Location or None

Obtains the shared GWeather.Location of type GWeather.LocationLevel.WORLD, representing a hierarchy containing all of the locations from Locations.xml.

GWeather.location_level_to_string(level)
Parameters:level (GWeather.LocationLevel) – a GWeather.LocationLevel
Returns:a string
Return type:str

Returns the location level as a string, useful for debugging purposes.

GWeather.sky_to_string(sky)
Parameters:sky (GWeather.Sky) –
Return type:str
GWeather.sky_to_string_full(sky, options)
Parameters:
Return type:

str

GWeather.temperature_unit_to_real(unit)
Parameters:unit (GWeather.TemperatureUnit) – a tempeature unit, or GWeather.TemperatureUnit.DEFAULT
Return type:GWeather.TemperatureUnit

Resolve unit into a real temperature unit, potentially considering locale defaults.

GWeather.timezone_get_by_tzid(tzid)
Parameters:tzid (str) – A timezone identifier, like “America/New_York” or “Europe/London”
Returns:A GWeather.Timezone. This object belongs to GWeather, do not unref it.
Return type:GWeather.Timezone

Get the GWeather.Timezone for tzid.

New in version 3.12.

GWeather.timezone_get_utc()
Returns:a GWeather.Timezone for UTC, or None on error.
Return type:GWeather.Timezone

Gets the UTC timezone.

GWeather.wind_direction_to_string(wind)
Parameters:wind (GWeather.WindDirection) –
Return type:str
GWeather.wind_direction_to_string_full(wind, options)
Parameters:
Return type:

str