Purge static current locale from API: complete
This commit is contained in:
parent
82318ffab7
commit
258775ff3f
@ -13,20 +13,12 @@ namespace InternalUtilities
|
|||||||
public static class AudibleApiActions
|
public static class AudibleApiActions
|
||||||
{
|
{
|
||||||
/// <summary>USE THIS from within Libation. It wraps the call with correct JSONPath</summary>
|
/// <summary>USE THIS from within Libation. It wraps the call with correct JSONPath</summary>
|
||||||
public static async Task<Api> GetApiAsync(Locale locale, ILoginCallback loginCallback = null)
|
public static Task<Api> GetApiAsync(Locale locale, ILoginCallback loginCallback = null)
|
||||||
{
|
=> EzApiCreator.GetApiAsync(locale, AudibleApiStorage.AccountsSettingsFile, AudibleApiStorage.TEST_GetFirstIdentityTokensJsonPath(), loginCallback);
|
||||||
Localization.SetLocale(Configuration.Instance.LocaleCountryCode);
|
|
||||||
|
|
||||||
return await EzApiCreator.GetApiAsync(locale, AudibleApiStorage.AccountsSettingsFile, AudibleApiStorage.TEST_GetFirstIdentityTokensJsonPath(), loginCallback);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>USE THIS from within Libation. It wraps the call with correct JSONPath</summary>
|
/// <summary>USE THIS from within Libation. It wraps the call with correct JSONPath</summary>
|
||||||
public static async Task<Api> GetApiAsync(Account account, ILoginCallback loginCallback = null)
|
public static Task<Api> GetApiAsync(Account account, ILoginCallback loginCallback = null)
|
||||||
{
|
=> EzApiCreator.GetApiAsync(account.Locale, AudibleApiStorage.AccountsSettingsFile, account.GetIdentityTokensJsonPath(), loginCallback);
|
||||||
Localization.SetLocale(Configuration.Instance.LocaleCountryCode);
|
|
||||||
|
|
||||||
return await EzApiCreator.GetApiAsync(account.Locale, AudibleApiStorage.AccountsSettingsFile, account.GetIdentityTokensJsonPath(), loginCallback);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static AsyncRetryPolicy policy { get; }
|
private static AsyncRetryPolicy policy { get; }
|
||||||
= Policy.Handle<Exception>()
|
= Policy.Handle<Exception>()
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
<!-- <PublishSingleFile>true</PublishSingleFile> -->
|
<!-- <PublishSingleFile>true</PublishSingleFile> -->
|
||||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||||
|
|
||||||
<Version>3.1.12.160</Version>
|
<Version>3.1.12.186</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@ -145,7 +145,6 @@ namespace LibationLauncher
|
|||||||
var localeName = jLocale.Value<string>();
|
var localeName = jLocale.Value<string>();
|
||||||
var locale = Localization.Get(localeName);
|
var locale = Localization.Get(localeName);
|
||||||
|
|
||||||
Localization.SetLocale(Configuration.Instance.LocaleCountryCode);
|
|
||||||
var api = EzApiCreator.GetApiAsync(locale, AccountsSettingsFileLegacy30).GetAwaiter().GetResult();
|
var api = EzApiCreator.GetApiAsync(locale, AccountsSettingsFileLegacy30).GetAwaiter().GetResult();
|
||||||
var email = api.GetEmailAsync().GetAwaiter().GetResult();
|
var email = api.GetEmailAsync().GetAwaiter().GetResult();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user