Skip to content

Commit

Permalink
[parse] added current weather option
Browse files Browse the repository at this point in the history
  • Loading branch information
pkoscik committed Mar 25, 2022
1 parent 6ebc724 commit f7a3a84
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions parse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public Options(string location, char type, char units)
[Option('l', Required = true, HelpText = "Location of the forceast")]
public string Location { get { return location; } }

[Option('t', Required = false, HelpText = "Type of the forecast: d - daily, w - weekly, m - monthly", Default = (char)'d')]
[Option('t', Required = false, HelpText = "Type of the forecast: c - current, d - daily, w - weekly, m - monthly", Default = (char)'c')]
public char Type { get { return type; } }

[Option('u', Required = false, HelpText = "Units of the forecast: m - metric, i - imperial", Default = (char)'m')]
Expand Down Expand Up @@ -116,10 +116,15 @@ private static void Run(Options options)

switch (options.Type)
{
case 'c':
{
Cli.printCurrent(selectedPlace, forecast);
break;
}

case 'd':
{
Cli.printDaily(selectedPlace, forecast);

break;
}

Expand Down

0 comments on commit f7a3a84

Please sign in to comment.