Structure
WeatherRequest
public struct WeatherRequest
Nested Type Aliases
Output
public typealias Output = WeatherResponse
Initializers
init(coordinate:excludedFields:date:urlSession:finishingQueue:)
public init(
coordinate: CLLocationCoordinate2D,
excludedFields: [ExcludableField]? = nil,
date: Date? = nil,
urlSession: URLSession = .shared,
finishingQueue: DispatchQueue = .main
)
Properties
coordinate
public let coordinate: CLLocationCoordinate2D
excludedFields
public let excludedFields: [ExcludableField]?
date
public let date: Date?
urlSession
public let urlSession: URLSession
finishingQueue
public let finishingQueue: DispatchQueue
Methods
publisher(apiKey: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?