// GET: api/Games/1234 public async Task<IHttpActionResult> Get(string id) { var gameDocument = await _games.GetGame(id); if (gameDocument == null) { return NotFound(); } Game game = new Game(gameDocument); var gameResponse = new GameResponse(game); return Ok(gameResponse); }
/// <summary> /// Response on client's attempt to watch the game /// </summary> /// <param name="res">Response with success or failure message</param> void IGameManagerCallback.HasWatchedGame(GameResponse res) { System.Console.WriteLine(res.Message); }
/// <summary> /// System error message display to client /// </summary> /// <param name="res">Response error message</param> void IGameManagerCallback.CatchError(GameResponse res) { System.Console.WriteLine(res.Message); }