Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Commit

Permalink
doc - Added missing documentation
Browse files Browse the repository at this point in the history
---

We've added missing code documentation for the Forecast class.

---

Type: doc
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Dec 10, 2023
1 parent 71ca8e7 commit e33e882
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions ManagedWeatherMap/Forecast.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@

namespace ManagedWeatherMap.Core
{
public static partial class Forecast
/// <summary>
/// The forecast tools
/// </summary>
public static class Forecast
{
internal static HttpClient WeatherDownloader = new();

Expand All @@ -42,6 +45,7 @@ public static partial class Forecast
/// </summary>
/// <param name="CityID">City ID</param>
/// <param name="APIKey">API key</param>
/// <param name="Unit">The preferred unit to use</param>
/// <returns>A class containing properties of weather information</returns>
public static ForecastInfo GetWeatherInfo(long CityID, string APIKey, UnitMeasurement Unit = UnitMeasurement.Metric)
{
Expand All @@ -54,6 +58,7 @@ public static ForecastInfo GetWeatherInfo(long CityID, string APIKey, UnitMeasur
/// </summary>
/// <param name="CityName">City name</param>
/// <param name="APIKey">API Key</param>
/// <param name="Unit">The preferred unit to use</param>
/// <returns>A class containing properties of weather information</returns>
public static ForecastInfo GetWeatherInfo(string CityName, string APIKey, UnitMeasurement Unit = UnitMeasurement.Metric)
{
Expand All @@ -65,6 +70,7 @@ public static ForecastInfo GetWeatherInfo(string CityName, string APIKey, UnitMe
/// Gets current weather info from OpenWeatherMap
/// </summary>
/// <param name="WeatherURL">An URL to the weather API request</param>
/// <param name="Unit">The preferred unit to use</param>
/// <returns>A class containing properties of weather information</returns>
internal static ForecastInfo GetWeatherInfo(string WeatherURL, UnitMeasurement Unit = UnitMeasurement.Metric)
{
Expand All @@ -89,6 +95,7 @@ internal static ForecastInfo GetWeatherInfo(string WeatherURL, UnitMeasurement U
/// </summary>
/// <param name="CityID">City ID</param>
/// <param name="APIKey">API key</param>
/// <param name="Unit">The preferred unit to use</param>
/// <returns>A class containing properties of weather information</returns>
public static async Task<ForecastInfo> GetWeatherInfoAsync(long CityID, string APIKey, UnitMeasurement Unit = UnitMeasurement.Metric)
{
Expand All @@ -101,6 +108,7 @@ public static async Task<ForecastInfo> GetWeatherInfoAsync(long CityID, string A
/// </summary>
/// <param name="CityName">City name</param>
/// <param name="APIKey">API Key</param>
/// <param name="Unit">The preferred unit to use</param>
/// <returns>A class containing properties of weather information</returns>
public static async Task<ForecastInfo> GetWeatherInfoAsync(string CityName, string APIKey, UnitMeasurement Unit = UnitMeasurement.Metric)
{
Expand All @@ -112,6 +120,7 @@ public static async Task<ForecastInfo> GetWeatherInfoAsync(string CityName, stri
/// Gets current weather info from OpenWeatherMap
/// </summary>
/// <param name="WeatherURL">An URL to the weather API request</param>
/// <param name="Unit">The preferred unit to use</param>
/// <returns>A class containing properties of weather information</returns>
internal static async Task<ForecastInfo> GetWeatherInfoAsync(string WeatherURL, UnitMeasurement Unit = UnitMeasurement.Metric)
{
Expand Down Expand Up @@ -196,7 +205,7 @@ internal static Dictionary<long, string> FinalizeCityList(Stream WeatherCityList
WeatherCityListUncompressed.Add((byte)WeatherCityListReadByte);
}

WeatherCityListToken = JToken.Parse(Encoding.Default.GetString(WeatherCityListUncompressed.ToArray()));
WeatherCityListToken = JToken.Parse(Encoding.Default.GetString([.. WeatherCityListUncompressed]));

// Put needed data to the class
foreach (JToken WeatherCityToken in WeatherCityListToken)
Expand Down

0 comments on commit e33e882

Please sign in to comment.