Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

SDLWeatherServiceData Class Reference

Section Contents

Overview

This data is related to what a weather service would provide.

-initWithLocation:

Convenience init for required parameters.

Objective-C

- (nonnull instancetype)initWithLocation:(nonnull SDLLocationDetails *)location;

Swift

init(location: SDLLocationDetails)

Parameters

location

The location

Return Value

A SDLWeatherServiceData object

-initWithLocation:currentForecast:minuteForecast:hourlyForecast:multidayForecast:alerts:

Convenience init for all parameters.

Objective-C

- (nonnull instancetype)
    initWithLocation:(nonnull SDLLocationDetails *)location
     currentForecast:(nullable SDLWeatherData *)currentForecast
      minuteForecast:(nullable NSArray<SDLWeatherData *> *)minuteForecast
      hourlyForecast:(nullable NSArray<SDLWeatherData *> *)hourlyForecast
    multidayForecast:(nullable NSArray<SDLWeatherData *> *)multidayForecast
              alerts:(nullable NSArray<SDLWeatherAlert *> *)alerts;

Swift

convenience init(location: SDLLocationDetails, currentForecast: SDLWeatherData?, minuteForecast: [SDLWeatherData]?, hourlyForecast: [SDLWeatherData]?, multidayForecast: [SDLWeatherData]?, alerts: [SDLWeatherAlert]?)

Parameters

location

The location

currentForecast

The current forecast

minuteForecast

A minute-by-minute array of forecasts

hourlyForecast

An hour-by-hour array of forecasts

multidayForecast

A day-by-day array of forecasts

alerts

An array of weather alerts

Return Value

A SDLWeatherServiceData object

location

The location.

SDLLocationDetails, Required

Objective-C

@property (readwrite, strong, nonatomic) SDLLocationDetails *_Nonnull location;

Swift

var location: SDLLocationDetails { get set }

currentForecast

The current forecast.

SDLWeatherData, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    SDLWeatherData *currentForecast;

Swift

var currentForecast: SDLWeatherData? { get set }

minuteForecast

A minute-by-minute array of forecasts.

Array of SDLWeatherData, Optional, minsize=15 maxsize=60

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSArray<SDLWeatherData *> *minuteForecast;

Swift

var minuteForecast: [SDLWeatherData]? { get set }

hourlyForecast

An hour-by-hour array of forecasts.

Array of SDLWeatherData, Optional, minsize=1 maxsize=96

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSArray<SDLWeatherData *> *hourlyForecast;

Swift

var hourlyForecast: [SDLWeatherData]? { get set }

multidayForecast

A day-by-day array of forecasts.

Array of SDLWeatherData, Optional, minsize=1 maxsize=30

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSArray<SDLWeatherData *> *multidayForecast;

Swift

var multidayForecast: [SDLWeatherData]? { get set }

alerts

An array of weather alerts. This array should be ordered with the first object being the current day.

Array of SDLWeatherData, Optional, minsize=1 maxsize=10

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSArray<SDLWeatherAlert *> *alerts;

Swift

var alerts: [SDLWeatherAlert]? { get set }
View on GitHub.com
Previous Section Next Section