/// <summary> /// Posts a review to game /// </summary> /// <param name="review">review object to be posted</param> public void PostReview(GameReview review) { AsyncHelper.RunSync(() => HTTPClientWrapper <GameReview> .PostRequest(this._xboxAPIUrl + @"game/Review", review)); }
/// <summary> /// Retrieves Game Rating definitions /// </summary> /// <returns>List of game ratings </returns> public List <GameRating> GetGameRatingDef() { return(AsyncHelper.RunSync <List <GameRating> >(() => HTTPClientWrapper <List <GameRating> > .Get(this._xboxAPIUrl + "game/Rating"))); }
/// <summary> /// Retrieves reviews of a game /// </summary> /// <param name="gameId">game identifier</param> /// <returns>List of game reviews</returns> public List <GameReview> GetGameReviews(int gameId) { return(AsyncHelper.RunSync <List <GameReview> >(() => HTTPClientWrapper <List <GameReview> > .Get(this._xboxAPIUrl + @"game/Review?gameId=" + gameId))); }
/// <summary> /// Edits Game description /// </summary> /// <param name="game">game with updated description</param> public void EditGame(Game game) { AsyncHelper.RunSync(() => HTTPClientWrapper <Game> .PutRequest(this._xboxAPIUrl + @"game/edit", game)); }
/// <summary> /// Retrieves all games /// </summary> /// <returns>list of games</returns> public List <Game> GetAllGames() { return(AsyncHelper.RunSync <List <Game> >(() => HTTPClientWrapper <List <Game> > .Get(this._xboxAPIUrl + "game"))); }