ogame-bot-api
Version:
Api to create a bot for ogame
42 lines (41 loc) • 1.16 kB
TypeScript
import { User, Server, Account } from './types';
import { GameApi } from '../game/GameApi';
/**
* The LobbyApi is used to login, get servers informations and load the GameApi
*/
export declare class LobbyApi {
private user;
private cookie;
/**
*
* @param email Email of the ogame account
* @param password Password of the ogame account
*/
login(email: string, password: string): Promise<void>;
/**
* @returns Returns the gloabl user informations
*/
me(): Promise<User>;
/**
* @returns Returns the user accounts. The user accounts are the
* differents server which the user is already connected at least one time
*/
getAccounts(): Promise<Account[]>;
/**
* @returns Returns the list of all ogame servers.
*/
listServers(): Promise<Server[]>;
/**
* @hidden
*/
private refreshUser;
/**
* Select last account played by the user
*/
selectLastPlayedAccount(): Promise<Account>;
/**
* Load the GameApi
* @param account The selected account to load the game
*/
loadGame(account: Account): Promise<GameApi>;
}