Libation 4.0 prep: full multiple account support

This commit is contained in:
Robert McRackan 2020-08-26 12:50:12 -04:00
parent 755a7338e9
commit a51e76d44d
5 changed files with 88 additions and 60 deletions

View file

@ -1,10 +1,8 @@
using System;
using System.IO;
using System.Linq;
using AudibleApi;
using FileManager;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace InternalUtilities
{
@ -19,13 +17,6 @@ namespace InternalUtilities
_ = new AccountsSettingsPersister(new AccountsSettings(), AccountsSettingsFile);
}
// convenience for for tests and demos. don't use in production Libation
public static string TEST_GetFirstIdentityTokensJsonPath()
=> TEST_GetFirstAccount().GetIdentityTokensJsonPath();
// convenience for for tests and demos. don't use in production Libation
public static Account TEST_GetFirstAccount()
=> GetPersistentAccountsSettings().GetAll().FirstOrDefault();
public static AccountsSettings GetPersistentAccountsSettings() => GetAccountsSettingsPersister().AccountsSettings;
public static AccountsSettingsPersister GetAccountsSettingsPersister() => new AccountsSettingsPersister(AccountsSettingsFile);