import { Account } from '../lobby/types'; import { ResourceList, ResourceFactoryList, FacilitiesList, ResearchList, ShipList, Ship, DefenseList, Defense, BuildingLight } from './types'; /** * The GameApi is used to interact with the game itself, create and list ressources/ship/research... * You should use LobbyApi to load it, don't create it yourself */ export declare class GameApi { private account; private axios; private browser; private page; private cookie; private loginUrl; private navigation; /** * @hidden */ constructor(cookie: string, account: Account, loginUrl: string); /** * Start the game api */ start(): Promise; private __getServerUrl; /** * Stop the game api. You should called this before exiting your program. */ stop(): Promise; /** * List your ressources */ resourcesList(): Promise; /** * List your mines and storage */ resourceFactoryList(): Promise; /** * List your facilities */ facilitiesList(): Promise; /** * List you research */ researchList(): Promise; /** * List your ships */ shipList(): Promise; /** * List your defenses */ defenseList(): Promise; /** * Upgrade or create a building. Don't use it for ships/defenses * @param building The building to upgrade */ makeUpgrade(building: BuildingLight): Promise; private haveEnoughResource; /** * Check if you can upgrade a building * @param building the building to upgrade * @param resources Optional parameter, if provided it will speed up the fonction */ canUpgrade(building: BuildingLight, resources?: ResourceList): Promise; /** * Check if you can create a certain amount of ship/defense * @param item Ship or Defense * @param count The number of items you wants to create * @param resources Optional parameter, if provided it will speed up the fonction */ canCreate(item: Ship | Defense, count?: number, resources?: ResourceList): Promise; /** * Create a ship * @param ship ship to create * @param count number of ship to create */ createShip(ship: Ship, count?: number): Promise; /** * Create a defense * @param defense defense to create * @param count number of defense to create */ createDefense(defense: Defense, count?: number): Promise; }