OpenWeather

public final class OpenWeather

Undocumented

Nested Types

  • Type that can be used to configure all settings at once

    See more

    Declaration

    Swift

    public struct Settings

Properties

  • A shared instance of the weather client

    Declaration

    Swift

    public static let shared: OpenWeather
  • The OpenWeatherMap API key to authorize requests

    Declaration

    Swift

    public var apiKey: String?
  • The language that should be used in API responses

    Declaration

    Swift

    public var language: RequestLanguage
  • The units that should be used to format the API responses

    Declaration

    Swift

    public var units: RequestUnits

Init

Sending Requests

Applying Settings

  • Applies new settings to the weather client

    Declaration

    Swift

    public func apply(_ settings: Settings)

    Parameters

    settings

    The weather client settings, including an API key, language and units