@@ -54,19 +54,100 @@ public virtual IEnumerable<PubgPlayer> GetPlayers(PubgRegion region, GetPubgPlay
5454 return JsonConvert . DeserializeObject < IEnumerable < PubgPlayer > > ( collectionJson , new JsonApiSerializerSettings ( ) ) ;
5555 }
5656
57- public virtual PubgPlayerSeason GetPlayerSeason ( PubgRegion region , string playerId , string seasonId , string apiKey = null )
57+ /// <summary>
58+ /// Gets the players season stats and matches for the default platform (steam)
59+ /// </summary>
60+ /// <param name="playerId">The ID of the player you wish to retrieve the season stats for</param>
61+ /// <param name="seasonId">The ID of the season you wish to recieve stats and matches for</param>
62+ /// <param name="apiKey">Your API key (optional)</param>
63+ /// <returns>Stats and matches for a given player during a given season</returns>
64+ /// <exception cref="Pubg.Net.Exceptions.PubgException">Exception thrown on the API side, details included on object</exception>
65+ /// <exception cref="Pubg.Net.Exceptions.PubgNotFoundException">The api is unable to find the specified player</exception>
66+ /// <exception cref="Pubg.Net.Exceptions.PubgTooManyRequestsException">You have exceeded your rate limit</exception>
67+ /// <exception cref="Pubg.Net.Exceptions.PubgUnauthorizedException">Invalid API Key</exception>
68+ public virtual PubgPlayerSeason GetPlayerSeasonPC ( string playerId , string seasonId , string apiKey = null ) => GetPlayerSeasonPC ( PubgPlatform . Steam , playerId , seasonId , apiKey ) ;
69+
70+ /// <summary>
71+ /// Gets the players season stats and matches for the specified platform
72+ /// </summary>
73+ /// <param name="platform">The platform on which the season took place</param>
74+ /// <param name="playerId">The ID of the player you wish to retrieve the season stats for</param>
75+ /// <param name="seasonId">The ID of the season you wish to recieve stats and matches for</param>
76+ /// <param name="apiKey">Your API key (optional)</param>
77+ /// <returns>Stats and matches for a given player during a given season</returns>
78+ /// <exception cref="Pubg.Net.Exceptions.PubgException">Exception thrown on the API side, details included on object</exception>
79+ /// <exception cref="Pubg.Net.Exceptions.PubgNotFoundException">The api is unable to find the specified player</exception>
80+ /// <exception cref="Pubg.Net.Exceptions.PubgTooManyRequestsException">You have exceeded your rate limit</exception>
81+ /// <exception cref="Pubg.Net.Exceptions.PubgUnauthorizedException">Invalid API Key</exception>
82+ public virtual PubgPlayerSeason GetPlayerSeasonPC ( PubgPlatform platform , string playerId , string seasonId , string apiKey = null )
5883 {
59- var url = Api . Players . PlayerSeasonsEndpoint ( region , playerId , seasonId ) ;
84+ var url = Api . Players . PlayerSeasonsPCEndpoint ( platform , playerId , seasonId ) ;
6085 apiKey = string . IsNullOrEmpty ( apiKey ) ? ApiKey : apiKey ;
6186
6287 var seasonJson = HttpRequestor . GetString ( url , apiKey ) ;
6388
6489 return JsonConvert . DeserializeObject < PubgPlayerSeason > ( seasonJson , new JsonApiSerializerSettings ( ) ) ;
6590 }
6691
67- public async virtual Task < PubgPlayerSeason > GetPlayerSeasonAsync ( PubgRegion region , string playerId , string seasonId , string apiKey = null , CancellationToken cancellationToken = default ( CancellationToken ) )
92+ /// <summary>
93+ /// Gets the players season stats and matches for the specified platform asynchronusly
94+ /// </summary>
95+ /// <param name="platform">The platform on which the season took place</param>
96+ /// <param name="playerId">The ID of the player you wish to retrieve the season stats for</param>
97+ /// <param name="seasonId">The ID of the season you wish to recieve stats and matches for</param>
98+ /// <param name="apiKey">Your API key (optional)</param>
99+ /// <returns>Stats and matches for a given player during a given season</returns>
100+ /// <exception cref="Pubg.Net.Exceptions.PubgException">Exception thrown on the API side, details included on object</exception>
101+ /// <exception cref="Pubg.Net.Exceptions.PubgNotFoundException">The api is unable to find the specified player</exception>
102+ /// <exception cref="Pubg.Net.Exceptions.PubgTooManyRequestsException">You have exceeded your rate limit</exception>
103+ /// <exception cref="Pubg.Net.Exceptions.PubgUnauthorizedException">Invalid API Key</exception>
104+ public async virtual Task < PubgPlayerSeason > GetPlayerSeasonPCAsync ( PubgPlatform platform , string playerId , string seasonId , string apiKey = null , CancellationToken cancellationToken = default ( CancellationToken ) )
68105 {
69- var url = Api . Players . PlayerSeasonsEndpoint ( region , playerId , seasonId ) ;
106+ var url = Api . Players . PlayerSeasonsPCEndpoint ( platform , playerId , seasonId ) ;
107+ apiKey = string . IsNullOrEmpty ( apiKey ) ? ApiKey : apiKey ;
108+
109+ var seasonJson = await HttpRequestor . GetStringAsync ( url , cancellationToken , apiKey ) . ConfigureAwait ( false ) ;
110+
111+ return JsonConvert . DeserializeObject < PubgPlayerSeason > ( seasonJson , new JsonApiSerializerSettings ( ) ) ;
112+ }
113+
114+ /// <summary>
115+ /// Gets the players season stats and matches played on the xbox in the specified region
116+ /// </summary>
117+ /// <param name="region">The region which the player is located in</param>
118+ /// <param name="playerId">The ID of the player you wish to retrieve the season stats for</param>
119+ /// <param name="seasonId">The ID of the season you wish to recieve stats and matches for</param>
120+ /// <param name="apiKey">Your API key (optional)</param>
121+ /// <returns>Stats and matches for a given player during a given season</returns>
122+ /// <exception cref="Pubg.Net.Exceptions.PubgException">Exception thrown on the API side, details included on object</exception>
123+ /// <exception cref="Pubg.Net.Exceptions.PubgNotFoundException">The api is unable to find the specified player</exception>
124+ /// <exception cref="Pubg.Net.Exceptions.PubgTooManyRequestsException">You have exceeded your rate limit</exception>
125+ /// <exception cref="Pubg.Net.Exceptions.PubgUnauthorizedException">Invalid API Key</exception>
126+ public virtual PubgPlayerSeason GetPlayerSeasonXbox ( PubgRegion region , string playerId , string seasonId , string apiKey = null )
127+ {
128+ var url = Api . Players . PlayerSeasonsXboxEndpoint ( region , playerId , seasonId ) ;
129+ apiKey = string . IsNullOrEmpty ( apiKey ) ? ApiKey : apiKey ;
130+
131+ var seasonJson = HttpRequestor . GetString ( url , apiKey ) ;
132+
133+ return JsonConvert . DeserializeObject < PubgPlayerSeason > ( seasonJson , new JsonApiSerializerSettings ( ) ) ;
134+ }
135+
136+ /// <summary>
137+ /// Gets the players season stats and matches played on the xbox in the specified region asychronusly
138+ /// </summary>
139+ /// <param name="region">The region which the player is located in</param>
140+ /// <param name="playerId">The ID of the player you wish to retrieve the season stats for</param>
141+ /// <param name="seasonId">The ID of the season you wish to recieve stats and matches for</param>
142+ /// <param name="apiKey">Your API key (optional)</param>
143+ /// <returns>Stats and matches for a given player during a given season</returns>
144+ /// <exception cref="Pubg.Net.Exceptions.PubgException">Exception thrown on the API side, details included on object</exception>
145+ /// <exception cref="Pubg.Net.Exceptions.PubgNotFoundException">The api is unable to find the specified player</exception>
146+ /// <exception cref="Pubg.Net.Exceptions.PubgTooManyRequestsException">You have exceeded your rate limit</exception>
147+ /// <exception cref="Pubg.Net.Exceptions.PubgUnauthorizedException">Invalid API Key</exception>
148+ public async virtual Task < PubgPlayerSeason > GetPlayerSeasonXboxAsync ( PubgRegion region , string playerId , string seasonId , string apiKey = null , CancellationToken cancellationToken = default ( CancellationToken ) )
149+ {
150+ var url = Api . Players . PlayerSeasonsXboxEndpoint ( region , playerId , seasonId ) ;
70151 apiKey = string . IsNullOrEmpty ( apiKey ) ? ApiKey : apiKey ;
71152
72153 var seasonJson = await HttpRequestor . GetStringAsync ( url , cancellationToken , apiKey ) . ConfigureAwait ( false ) ;
0 commit comments