Api work for #205

Refactored how we check if the user has a valid api key
Added POST request, PUT and DELTE

Also some work on the updater #29
This commit is contained in:
tidusjar 2016-05-19 10:36:02 +01:00
parent 030c013862
commit 7266f20927
10 changed files with 306 additions and 80 deletions

View file

@ -61,7 +61,7 @@ namespace PlexRequests.UI
x => x.Port,
e => -1);
var updated = result.MapResult(x => x.Updated, e => false);
var updated = result.MapResult(x => x.Updated, e => UpdateValue.None);
//TODO
PrintToConsole("Starting Up! Please wait, this can usually take a few seconds.", ConsoleColor.Yellow);
@ -158,5 +158,17 @@ namespace PlexRequests.UI
Console.WriteLine(message);
Console.ForegroundColor = ConsoleColor.Gray;
}
private static void CheckUpdate(UpdateValue val)
{
if (val == UpdateValue.Failed)
{
}
if (val == UpdateValue.Updated)
{
// TODO Change the name of PlexRequests.Updater.exe_Updated and delete the old version
}
}
}
}