diff --git a/FileManager/UNTESTED/AudibleApiStorage.cs b/FileManager/UNTESTED/AudibleApiStorage.cs index 868d47c3..7f06a75e 100644 --- a/FileManager/UNTESTED/AudibleApiStorage.cs +++ b/FileManager/UNTESTED/AudibleApiStorage.cs @@ -1,10 +1,26 @@ -using System.IO; +using Newtonsoft.Json; +using System.IO; namespace FileManager { public static class AudibleApiStorage { - // not customizable. don't move to config public static string AccountsSettingsFile => Path.Combine(Configuration.Instance.LibationFiles, "AccountsSettings.json"); + + public static string GetJsonPath( + //string username + ////, string locale + ) + { + return null; + + + //var usernameSanitized = JsonConvert.ToString(username); + + ////var localeSanitized = JsonConvert.ToString(locale); + ////return $"$.ApiConnectionSettings[?(@.Username == '{usernameSanitized}' && @.IdentityTokens.Locale == '{localeSanitized}')].IdentityTokens"; + + //return $"$.ApiConnectionSettings[?(@.Username == '{usernameSanitized}')].IdentityTokens"; + } } } diff --git a/InternalUtilities/UNTESTED/AudibleApiActions.cs b/InternalUtilities/UNTESTED/AudibleApiActions.cs index 2b743a4a..29578cfe 100644 --- a/InternalUtilities/UNTESTED/AudibleApiActions.cs +++ b/InternalUtilities/UNTESTED/AudibleApiActions.cs @@ -15,13 +15,9 @@ namespace InternalUtilities /// USE THIS from within Libation. It wraps the call with correct JSONPath public static async Task GetApiAsync(ILoginCallback loginCallback = null) { - var identityFilePath = AudibleApiStorage.AccountsSettingsFile; - - // TODO: get jsonpath from ... somewhere - string jsonPath = null; Localization.SetLocale(Configuration.Instance.LocaleCountryCode); - return await EzApiCreator.GetApiAsync(identityFilePath, loginCallback, jsonPath); + return await EzApiCreator.GetApiAsync(AudibleApiStorage.AccountsSettingsFile, AudibleApiStorage.GetJsonPath(), loginCallback); } private static AsyncRetryPolicy policy { get; } diff --git a/LibationLauncher/LibationLauncher.csproj b/LibationLauncher/LibationLauncher.csproj index dda944db..b3611b1e 100644 --- a/LibationLauncher/LibationLauncher.csproj +++ b/LibationLauncher/LibationLauncher.csproj @@ -13,7 +13,7 @@ win-x64 - 3.1.12.54 + 3.1.12.62