HPOpenWeather Documentation Beta

Structure Weather​Request

public struct WeatherRequest 

Nested Type Aliases

Output

public typealias Output = WeatherResponse

Initializers

init(coordinate:​excluded​Fields:​date:​url​Session:​finishing​Queue:​)

public init(
		coordinate: CLLocationCoordinate2D,
		excludedFields: [ExcludableField]? = nil,
		date: Date? = nil,
		urlSession: URLSession = .shared,
		finishingQueue: DispatchQueue = .main
	) 

Properties

coordinate

public let coordinate: CLLocationCoordinate2D

excluded​Fields

public let excludedFields: [ExcludableField]?

date

public let date: Date?

url​Session

public let urlSession: URLSession

finishing​Queue

public let finishingQueue: DispatchQueue

Methods

publisher(api​Key:​language:​units:​)

func publisher(apiKey: String, language: RequestLanguage = .english, units: RequestUnits = .metric) -> AnyPublisher<Output, Error> 

publisher(settings:​)

func publisher(settings: OpenWeather.Settings) -> AnyPublisher<Output, Error> 

error(from:​)

static func error(from response: URLResponse?) -> Error?