Skip to main content

IHighLevelApiClient

An interface in Alta.Api.Client, Alta.Api.Client.HighLevel.

The game's client for Alta's old web API, one property per area. You get it from ApiAccess.ApiClient. The services are gone, so most calls time out unless a mod answers them.

Properties​

MemberWhat it is
IAccountClient Account { get; }Account client. Null until logged in.
IAchievementClient AchievementClient { get; }Achievements client. Null until logged in.
IAnalyticsClient Analytics { get; }Analytics event client. Exists before login.
IFutureUserActions FutureUserActions { get; }Client for scheduled user actions. Null until logged in.
IGroupsClient Groups { get; }Groups (server communities) client. Null until logged in.
IInstancesClient Instances { get; }Server instances client. Null until logged in.
bool IsLoggedIn { get; }True when UserClient.LoggedInUserInfo is set.
ILauncherApiClient LauncherClient { get; }Launcher client. Null until logged in.
LowLevelApiClient LowLevel { get; }The LowLevelApiClient that makes the HTTP requests and holds the tokens.
IMatchMakingClient MatchMaking { get; }Matchmaking client. Null until logged in.
IOculusClient Oculus { get; }Oculus platform client. Exists before login.
IPicoClient Pico { get; }Pico platform client. Exists before login.
IPlayerReportsClient PlayerReports { get; }Player reports client. Null until logged in.
IRecentPlayersClient RecentPlayers { get; }Recent players client. Null until logged in.
ISecurityApiClient SecurityClient { get; }Security client. Null until logged in.
IServerApiClient ServerClient { get; }Server list, permissions and join client. Null until logged in.
IServicesApiClient ServicesClient { get; }General services client (public IP lookup, identity token checks). Exists before login.
ISettingsClient SettingsClient { get; }User settings client. Null until logged in.
IShopApiClient ShopClient { get; }Shop client. Null until logged in.
ISocialClient SocialClient { get; }Friends client. Null until logged in.
IUserApiClient UserClient { get; }User account client. Holds the logged-in user's info. Exists before login.
LoginCredentials UserCredentials { get; }The current login tokens, from the low-level client.
IVoiceApiClient VoiceClient { get; }Voice chat client. Null until logged in.

Events​

MemberWhat it is
event LoginCredentialsChangedHandler CredentialsChangedRaised when the low-level client's login tokens change, such as after a refresh.

Methods​

MemberWhat it is
Task<IUserApiClient> LoginAsync(string username, string passwordHash)Logs in with a username and password hash, then creates the logged-in clients. Throws if already logged in.
Task<IUserApiClient> LoginViaOauth(string clientId, string clientSecret, string scope)Logs in with OAuth client credentials (client id, secret and scope). Throws if already logged in.
Task<IUserApiClient> LoginWithEmailAsync(string email, string passwordHash)Logs in with an email and password hash. Throws if already logged in.
Task<IUserApiClient> LoginWithOculus(string userNonce, ulong userIdentifier)Logs in through a linked Oculus account (nonce and user id). Throws if already logged in.
Task<IUserApiClient> LoginWithPico(string userToken, ulong userIdentifier)Logs in through a linked Pico account (token and user id). Throws if already logged in.
Task<IUserApiClient> LoginWithRefreshTokenAsync(string refreshToken)Logs in with a refresh token. Throws if already logged in.
IUserApiClient LoginWithTokens(string accessToken, string refreshToken, string identityToken)Logs in from existing access, refresh and identity tokens without a web request. Throws if already logged in.
void Logout()Clears the login tokens and the logged-in user info.
Task<UserInfo> RegisterOculusUserAsync(string username, string passwordHash, string email, string referral, AccountLinkData linkData)Registers a new account linked to an Oculus account.
Task<UserInfo> RegisterPicoUserAsync(string username, string passwordHash, string email, string referral, AccountLinkData linkData)Registers a new account linked to a Pico account.
Task<UserInfo> RegisterUserAsync(string username, string passwordHash, string email, string referral)Registers a new account with a username, password hash, email and referral.

Used in​

Members of other types that take, return or hold a IHighLevelApiClient: