diff --git a/src/Weatherstack/Errors/BulkQueriesNotSupported.cs b/src/Weatherstack/Errors/BulkQueriesNotSupported.cs new file mode 100644 index 0000000..547d8c6 --- /dev/null +++ b/src/Weatherstack/Errors/BulkQueriesNotSupported.cs @@ -0,0 +1,23 @@ +// Copyright (c) 2024 tacosontitan +// This file is part of the Weatherstack project, which is distributed under the MIT license. +// See LICENSE for more information. + +/* + The folder containing this file is not intended to be a part of the + namespace, it is purely for organizational purposes. +*/ + +namespace Weatherstack.Errors; + +public static partial class Errors +{ + /// + /// Indicates that bulk queries are not supported on the current subscription plan. + /// + public static ApiError BulkQueriesNotSupported => new() + { + Code = 604, + Type = "604_bulk_queries_not_supported_on_plan", + Information = "Bulk queries are not supported on the current subscription plan." + }; +} diff --git a/src/Weatherstack/Errors/Forbidden.cs b/src/Weatherstack/Errors/Forbidden.cs new file mode 100644 index 0000000..a496ceb --- /dev/null +++ b/src/Weatherstack/Errors/Forbidden.cs @@ -0,0 +1,23 @@ +// Copyright (c) 2024 tacosontitan +// This file is part of the Weatherstack project, which is distributed under the MIT license. +// See LICENSE for more information. + +/* + The folder containing this file is not intended to be a part of the + namespace, it is purely for organizational purposes. +*/ + +namespace Weatherstack.Errors; + +public static partial class Errors +{ + /// + /// Access is denied because the current subscription plan does not support the requested API function or HTTPS access. + /// + public static ApiError Forbidden => new() + { + Code = 403, + Type = "forbidden", + Information = "The user's current subscription plan does not support this API function / HTTPS." + }; +} diff --git a/src/Weatherstack/Errors/ForecastDaysNotSupported.cs b/src/Weatherstack/Errors/ForecastDaysNotSupported.cs new file mode 100644 index 0000000..4df6b08 --- /dev/null +++ b/src/Weatherstack/Errors/ForecastDaysNotSupported.cs @@ -0,0 +1,23 @@ +// Copyright (c) 2024 tacosontitan +// This file is part of the Weatherstack project, which is distributed under the MIT license. +// See LICENSE for more information. + +/* + The folder containing this file is not intended to be a part of the + namespace, it is purely for organizational purposes. +*/ + +namespace Weatherstack.Errors; + +public static partial class Errors +{ + /// + /// Indicates that weather forecast data is not supported on the current subscription plan. + /// + public static ApiError ForecastDaysNotSupported => new() + { + Code = 609, + Type = "609_forecast_days_not_supported_on_plan", + Information = "Weather forecast data is not supported on the current subscription plan." + }; +} diff --git a/src/Weatherstack/Errors/HistoricalQueriesNotSupported.cs b/src/Weatherstack/Errors/HistoricalQueriesNotSupported.cs new file mode 100644 index 0000000..a086cd9 --- /dev/null +++ b/src/Weatherstack/Errors/HistoricalQueriesNotSupported.cs @@ -0,0 +1,23 @@ +// Copyright (c) 2024 tacosontitan +// This file is part of the Weatherstack project, which is distributed under the MIT license. +// See LICENSE for more information. + +/* + The folder containing this file is not intended to be a part of the + namespace, it is purely for organizational purposes. +*/ + +namespace Weatherstack.Errors; + +public static partial class Errors +{ + /// + /// Indicates that historical data is not supported on the current subscription plan. + /// + public static ApiError HistoricalQueriesNotSupported => new() + { + Code = 603, + Type = "603_historical_queries_not_supported_on_plan", + Information = "Historical data is not supported on the current subscription plan." + }; +} diff --git a/src/Weatherstack/Errors/HistoricalTimeFrameTooLong.cs b/src/Weatherstack/Errors/HistoricalTimeFrameTooLong.cs new file mode 100644 index 0000000..2cfffd1 --- /dev/null +++ b/src/Weatherstack/Errors/HistoricalTimeFrameTooLong.cs @@ -0,0 +1,23 @@ +// Copyright (c) 2024 tacosontitan +// This file is part of the Weatherstack project, which is distributed under the MIT license. +// See LICENSE for more information. + +/* + The folder containing this file is not intended to be a part of the + namespace, it is purely for organizational purposes. +*/ + +namespace Weatherstack.Errors; + +public static partial class Errors +{ + /// + /// Indicates that the specified historical time frame exceeds the maximum allowed limit of 60 days. + /// + public static ApiError HistoricalTimeFrameTooLong => new() + { + Code = 613, + Type = "613_historical_time_frame_too_long", + Information = "The specified historical time frame is too long. (Maximum: 60 days)" + }; +} diff --git a/src/Weatherstack/Errors/InvalidForecastDays.cs b/src/Weatherstack/Errors/InvalidForecastDays.cs new file mode 100644 index 0000000..22bf259 --- /dev/null +++ b/src/Weatherstack/Errors/InvalidForecastDays.cs @@ -0,0 +1,23 @@ +// Copyright (c) 2024 tacosontitan +// This file is part of the Weatherstack project, which is distributed under the MIT license. +// See LICENSE for more information. + +/* + The folder containing this file is not intended to be a part of the + namespace, it is purely for organizational purposes. +*/ + +namespace Weatherstack.Errors; + +public static partial class Errors +{ + /// + /// Indicates that an invalid value was specified for the number of forecast days. + /// + public static ApiError InvalidForecastDays => new() + { + Code = 608, + Type = "608_invalid_forecast_days", + Information = "An invalid forecast days value was specified." + }; +} diff --git a/src/Weatherstack/Errors/InvalidHistoricalDate.cs b/src/Weatherstack/Errors/InvalidHistoricalDate.cs new file mode 100644 index 0000000..2cb83da --- /dev/null +++ b/src/Weatherstack/Errors/InvalidHistoricalDate.cs @@ -0,0 +1,23 @@ +// Copyright (c) 2024 tacosontitan +// This file is part of the Weatherstack project, which is distributed under the MIT license. +// See LICENSE for more information. + +/* + The folder containing this file is not intended to be a part of the + namespace, it is purely for organizational purposes. +*/ + +namespace Weatherstack.Errors; + +public static partial class Errors +{ + /// + /// Indicates that the specified historical date is invalid. + /// + public static ApiError InvalidHistoricalDate => new() + { + Code = 611, + Type = "611_invalid_historical_date", + Information = "An invalid historical date was specified." + }; +} diff --git a/src/Weatherstack/Errors/InvalidHistoricalTimeFrame.cs b/src/Weatherstack/Errors/InvalidHistoricalTimeFrame.cs new file mode 100644 index 0000000..8c239a8 --- /dev/null +++ b/src/Weatherstack/Errors/InvalidHistoricalTimeFrame.cs @@ -0,0 +1,23 @@ +// Copyright (c) 2024 tacosontitan +// This file is part of the Weatherstack project, which is distributed under the MIT license. +// See LICENSE for more information. + +/* + The folder containing this file is not intended to be a part of the + namespace, it is purely for organizational purposes. +*/ + +namespace Weatherstack.Errors; + +public static partial class Errors +{ + /// + /// Indicates that the specified historical time frame is invalid. + /// + public static ApiError InvalidHistoricalTimeFrame => new() + { + Code = 612, + Type = "612_invalid_historical_time_frame", + Information = "An invalid historical time frame was specified." + }; +} diff --git a/src/Weatherstack/Errors/InvalidInterval.cs b/src/Weatherstack/Errors/InvalidInterval.cs new file mode 100644 index 0000000..b173a9e --- /dev/null +++ b/src/Weatherstack/Errors/InvalidInterval.cs @@ -0,0 +1,23 @@ +// Copyright (c) 2024 tacosontitan +// This file is part of the Weatherstack project, which is distributed under the MIT license. +// See LICENSE for more information. + +/* + The folder containing this file is not intended to be a part of the + namespace, it is purely for organizational purposes. +*/ + +namespace Weatherstack.Errors; + +public static partial class Errors +{ + /// + /// Indicates that the specified interval value is invalid + /// + public static ApiError InvalidInterval => new() + { + Code = 607, + Type = "607_invalid_interval", + Information = "An invalid interval value was specified." + }; +} diff --git a/src/Weatherstack/Errors/InvalidLanguage.cs b/src/Weatherstack/Errors/InvalidLanguage.cs new file mode 100644 index 0000000..2503f1d --- /dev/null +++ b/src/Weatherstack/Errors/InvalidLanguage.cs @@ -0,0 +1,23 @@ +// Copyright (c) 2024 tacosontitan +// This file is part of the Weatherstack project, which is distributed under the MIT license. +// See LICENSE for more information. + +/* + The folder containing this file is not intended to be a part of the + namespace, it is purely for organizational purposes. +*/ + +namespace Weatherstack.Errors; + +public static partial class Errors +{ + /// + /// Indicates that the specified language code is invalid. + /// + public static ApiError InvalidLanguage => new() + { + Code = 605, + Type = "605_invalid_language", + Information = "An invalid language code was specified." + }; +} diff --git a/src/Weatherstack/Errors/InvalidUnit.cs b/src/Weatherstack/Errors/InvalidUnit.cs new file mode 100644 index 0000000..ed1b174 --- /dev/null +++ b/src/Weatherstack/Errors/InvalidUnit.cs @@ -0,0 +1,23 @@ +// Copyright (c) 2024 tacosontitan +// This file is part of the Weatherstack project, which is distributed under the MIT license. +// See LICENSE for more information. + +/* + The folder containing this file is not intended to be a part of the + namespace, it is purely for organizational purposes. +*/ + +namespace Weatherstack.Errors; + +public static partial class Errors +{ + /// + /// Indicates that the specified unit value is invalid. + /// + public static ApiError InvalidUnit => new() + { + Code = 606, + Type = "606_invalid_unit", + Information = "An invalid unit value was specified." + }; +} diff --git a/src/Weatherstack/Errors/MissingHistoricalDate.cs b/src/Weatherstack/Errors/MissingHistoricalDate.cs new file mode 100644 index 0000000..1ed6744 --- /dev/null +++ b/src/Weatherstack/Errors/MissingHistoricalDate.cs @@ -0,0 +1,23 @@ +// Copyright (c) 2024 tacosontitan +// This file is part of the Weatherstack project, which is distributed under the MIT license. +// See LICENSE for more information. + +/* + The folder containing this file is not intended to be a part of the + namespace, it is purely for organizational purposes. +*/ + +namespace Weatherstack.Errors; + +public static partial class Errors +{ + /// + /// Indicates that a historical date is missing. + /// + public static ApiError MissingHistoricalDate => new() + { + Code = 614, + Type = "614_missing_historical_date", + Information = "An invalid historical date was specified." + }; +} diff --git a/src/Weatherstack/Errors/MissingQuery.cs b/src/Weatherstack/Errors/MissingQuery.cs new file mode 100644 index 0000000..6c6c168 --- /dev/null +++ b/src/Weatherstack/Errors/MissingQuery.cs @@ -0,0 +1,23 @@ +// Copyright (c) 2024 tacosontitan +// This file is part of the Weatherstack project, which is distributed under the MIT license. +// See LICENSE for more information. + +/* + The folder containing this file is not intended to be a part of the + namespace, it is purely for organizational purposes. +*/ + +namespace Weatherstack.Errors; + +public static partial class Errors +{ + /// + /// Indicates that a required query value is missing. + /// + public static ApiError MissingQuery => new() + { + Code = 601, + Type = "601_missing_query", + Information = "An invalid (or missing) query value was specified." + }; +} diff --git a/src/Weatherstack/Errors/RequestFailed.cs b/src/Weatherstack/Errors/RequestFailed.cs new file mode 100644 index 0000000..3e886d6 --- /dev/null +++ b/src/Weatherstack/Errors/RequestFailed.cs @@ -0,0 +1,23 @@ +// Copyright (c) 2024 tacosontitan +// This file is part of the Weatherstack project, which is distributed under the MIT license. +// See LICENSE for more information. + +/* + The folder containing this file is not intended to be a part of the + namespace, it is purely for organizational purposes. +*/ + +namespace Weatherstack.Errors; + +public static partial class Errors +{ + /// + /// Indicates that the API request has failed. + /// + public static ApiError RequestFailed => new() + { + Code = 615, + Type = "615_request_failed", + Information = "API request has failed." + }; +}