import { BaseService } from './base-service' import { Game } from '../interfaces/game' export class GameService extends BaseService { public getGames(): Promise { return this.get("games") } public getGame(gameId: string): Promise { return this.get(`games/${gameId}`) } public async upload(game: Game) : Promise { return this.post(`games`, null).then(); } public async update(game: Game) : Promise { return this.put(`games`, null).then(); } public async activate(gameId: string): Promise { return this.post(`games/${gameId}/activate`, null).then(); } public async deactivate(gameId: string): Promise { return this.post(`games/${gameId}/deactivate`, null).then(); } public async download(gameId: string): Promise { return this.get(`games/${gameId}/download`).then(); } public async downloadAll(): Promise { return this.get(`games/download`).then(); } public async patch(): Promise { return this.put(`games/patch`, null).then(); } public async minor(): Promise { return this.put(`games/minor`, null).then(); } public async major(): Promise { return this.put(`games/major`, null).then(); } public async metadata(): Promise { return this.post(`games/metadata`, null).then(); } }