/// <summary>
        ///     Gets the match history of a player.
        /// </summary>
        /// <param name="playerName">
        ///     Name of the player to get matches for.
        /// </param>
        /// <param name="heroId">
        ///     ID of the hero to filter matches for.
        /// </param>
        /// <param name="gameMode">
        ///     Game mode to filter matches for.
        /// </param>
        /// <returns>
        ///     Returns a JSON object serialized as a string.
        /// </returns>
        protected string GetMatchHistory(string playerName, int? heroId = null, Dota2GameMode? gameMode = null)
        {
            var matchHistoryResponse =
                SteamWebAPI.Game().Dota2()
                    .IDOTA2Match()
                    .GetMatchHistory()
                    .PlayerName(playerName)
                    .GetResponse();

            string json = JsonConvert.SerializeObject(matchHistoryResponse);

            return json;
        }
Ejemplo n.º 2
0
 /// <summary>
 ///     Game mode to filter.
 /// </summary>
 /// <param name="value"></param>
 /// <returns></returns>
 public GetMatchHistoryBuilder GameMode(Dota2GameMode value)
 {
     this.Request.GameMode = value;
     return(this);
 }