Class OpenWeatherCapabilities
- Namespace
- SimpleWeather
- Assembly
- SimpleWeather.dll
Represents the effective OpenWeather capabilities available to the application. This includes which API features can be used and any associated limits.
public sealed class OpenWeatherCapabilities
- Inheritance
-
OpenWeatherCapabilities
- Inherited Members
Remarks
Initializes a new instance of the OpenWeatherCapabilities class.
Constructors
OpenWeatherCapabilities(OpenWeatherFeatures, int, TimeSpan)
Represents the effective OpenWeather capabilities available to the application. This includes which API features can be used and any associated limits.
public OpenWeatherCapabilities(OpenWeatherFeatures features, int maxForecastDays, TimeSpan forecastStep)
Parameters
featuresOpenWeatherFeaturesThe set of available OpenWeather feature flags.
maxForecastDaysintThe maximum number of forecast days supported by the plan.
forecastStepTimeSpanThe time-step between forecast entries supported by the plan.
Remarks
Initializes a new instance of the OpenWeatherCapabilities class.
Properties
Features
Gets the set of OpenWeather feature flags available to the application.
public OpenWeatherFeatures Features { get; }
Property Value
- OpenWeatherFeatures
The set of OpenWeather feature flags available to the application.
ForecastStep
Gets the time-step between forecast entries provided by the supported forecast endpoint.
public TimeSpan ForecastStep { get; }
Property Value
- TimeSpan
The time-step between forecast entries provided by the supported forecast endpoint.
Free
Gets the capability preset for the free plan using the 5 day / 3 hour forecast endpoint.
public static OpenWeatherCapabilities Free { get; }
Property Value
- OpenWeatherCapabilities
The capability preset for the free plan using the 5 day / 3 hour forecast endpoint.
MaxForecastDays
Gets the maximum number of forecast days supported by the current plan.
public int MaxForecastDays { get; }
Property Value
- int
The maximum number of forecast days supported by the current plan.
PaidOneCall
Gets the capability preset for paid plans using One Call.
public static OpenWeatherCapabilities PaidOneCall { get; }
Property Value
- OpenWeatherCapabilities
The capability preset for paid plans using One Call.
Methods
Has(OpenWeatherFeatures)
Returns a value indicating whether the specified feature flag(s) are available.
public bool Has(OpenWeatherFeatures feature)
Parameters
featureOpenWeatherFeaturesThe feature flag(s) to test for.