Something went wrong. Try again.
TypeScript client for accessing TLE Community.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445import Lacuna from '../lacuna';import Endpoint from '../core/endpoint';import * as B from '../types/building';
class Building extends Endpoint { lacuna: Lacuna; module: string;
constructor(lacuna: Lacuna, module: string) { super(); this.lacuna = lacuna; this.module = module; }
view(params: B.ViewParams) { return this.callWithSession<B.ViewResponse>('view', params); }
upgrade(params: B.UpgradeParams) { return this.callWithSession<B.UpgradeResponse>('upgrade', params); }
downgrade(params: B.DowngradeParams) { return this.withBuildingIds(this.callWithSession<B.DowngradeResponse>('downgrade', params)); }
demolish(params: B.DemolishParams) { return this.withBuildingIds(this.callWithSession<B.DemolishResponse>('demolish', params)); }
build(params: B.BuildParams) { return this.withBuildingIds(this.callWithSession<B.BuildResponse>('build', params)); }
repair(params: B.RepairParams) { return this.withBuildingIds(this.callWithSession<B.RepairResponse>('repair', params)); }
getStatsForLevel(params: B.GetStatsForLevelParams) { return this.callWithSession<B.GetStatsForLevelResponse>('get_stats_for_level', params); }}
export default Building;