Skip to main content

OfflineHighLevelApiClient

A class in Alta.Api.Client, Alta.Api.Client.HighLevel.

The API client used when the game starts offline (ApiAccess.StartOffline). It answers locally, and logs in from the stored access token's claims. Several areas are left null.

Constructors​

MemberWhat it is
OfflineHighLevelApiClient(LoginCredentials credentials)Creates an OfflineHighLevelApiClient from credentials.

Properties​

MemberWhat it is
IAccountClient Account { get; }Always null offline.
IAchievementClient AchievementClient { get; }An OfflineAchievementApiClient.
IAnalyticsClient Analytics { get; }Always null offline.
IFutureUserActions FutureUserActions { get; }Always null offline.
IGroupsClient Groups { get; }An OfflineGroupsClient, which throws on every call.
IInstancesClient Instances { get; private set; }Always null offline.
bool IsLoggedIn { get; }True once one of the login methods has created UserClient.
ILauncherApiClient LauncherClient { get; }An OfflineLauncherApiClient.
LowLevelApiClient LowLevel { get; }Always null offline, so code that uses LowLevel directly fails.
IMatchMakingClient MatchMaking { get; private set; }Always null offline.
IOculusClient Oculus { get; }Always null offline.
IPicoClient Pico { get; }Always null offline.
IPlayerReportsClient PlayerReports { get; }Always null offline.
IRecentPlayersClient RecentPlayers { get; }Always null offline.
ISecurityApiClient SecurityClient { get; }An OfflineSecurityApiClient.
IServerApiClient ServerClient { get; }An OfflineServerApiClient.
IServicesApiClient ServicesClient { get; }An OfflineServicesApiClient.
ISettingsClient SettingsClient { get; }Always null offline.
IShopApiClient ShopClient { get; }An OfflineShopApiClient.
ISocialClient SocialClient { get; }An OfflineSocialClient.
IUserApiClient UserClient { get; private set; }The OfflineUserApiClient after login, null before.
LoginCredentials UserCredentials { get; }The stored credentials the client was made with.
IVoiceApiClient VoiceClient { get; }An OfflineVoiceClient.

Events​

MemberWhat it is
event LoginCredentialsChangedHandler CredentialsChangedNever raised by the offline client.

Methods​

MemberWhat it is
Task<IUserApiClient> LoginAsync(string username, string passwordHash)Ignores the username and password and logs in from the stored token.
Task<IUserApiClient> LoginViaOauth(string clientId, string clientSecret, string scope)Throws OfflineException.
Task<IUserApiClient> LoginWithEmailAsync(string email, string passwordHash)Ignores the email and password and logs in from the stored token.
Task<IUserApiClient> LoginWithOculus(string userNonce, ulong userIdentifier)Ignores the Oculus details and logs in from the stored token.
Task<IUserApiClient> LoginWithPico(string userToken, ulong userIdentifier)Ignores the Pico details and logs in from the stored token.
Task<IUserApiClient> LoginWithRefreshTokenAsync(string refreshToken)Ignores the refresh token and logs in from the stored token.
IUserApiClient LoginWithTokens(string accessToken, string refreshToken, string identityToken)Ignores the given tokens and logs in from the stored credentials' access token.
void Logout()Clears UserClient, so IsLoggedIn becomes false.
Task<UserInfo> RegisterOculusUserAsync(string username, string passwordHash, string email, string referral, AccountLinkData linkData)Throws NotImplementedException.
Task<UserInfo> RegisterPicoUserAsync(string username, string passwordHash, string email, string referral, AccountLinkData linkData)Throws NotImplementedException.
Task<UserInfo> RegisterUserAsync(string username, string passwordHash, string email, string referral)Throws NotImplementedException.
2 private and internal methods
MemberWhat it is
private void CreateLoggedInApiClients()Builds the user info from the stored access token and creates the OfflineUserApiClient.
private IUserApiClient Login()Creates the user client from the stored token. Throws AuthorizationException if already logged in.