/** @module PlayerIOClient */ import HTTPChannel from "./channel"; import GameFS from "./services/gamefs"; import PayVault from "./services/payvault"; import BigDB from "./services/bigdb"; import Multiplayer from "./services/multiplayer"; import Achievements from "./services/achievements"; import { KeyValue } from "./utilities/util"; /** * If you're creating a new one, use authenticate/quickconnect (via the class, not an instance of itself!) */ export default class PlayerIOClient { /** * User id of the currently connected user. */ connectUserId: string; /** * The game id of the client. */ gameId: string; /** * This is where the api requests are made, don't use this unless you know what you're doing. * This is for internal use mainly. */ channel: HTTPChannel; /** * The GameFS service. */ gameFS: GameFS; /** * The PayVault service. */ payVault: PayVault; /** * The BigDB service. */ bigDB: BigDB; /** * The Multiplayer service. */ multiplayer: Multiplayer; /** * The Achievements service. */ achievements: Achievements; constructor(channel: HTTPChannel, gameId: string, gameFsRedirectMap: any, userId: string); /** * Authenticates a user to Player.IO. See the Authentication documentation on which authenticationArguments that are needed for each authentication provider. * @param gameId The game id of the game you wish to connect to. This value can be found in the admin panel. * @param connectionId The id of the connection, as given in the settings section of the admin panel. 'public' should be used as the default * @param authenticationArguments A dictionary of arguments for the given connection. * @param playerInsightSegments Custom segments for the user in PlayerInsight. */ static authenticate(gameId: string, connectionId: string, authenticationArguments?: KeyValue, playerInsightSegments?: KeyValue): Promise; }