99
1010namespace SteamWebAPI2
1111{
12+ /// <summary>
13+ /// Represents a request to send to a Steam Store Web API
14+ /// </summary>
1215 internal class SteamStoreRequest
1316 {
1417 private string steamStoreApiBaseUrl ;
1518
19+ /// <summary>
20+ /// Constructs a Steam Store Web API request
21+ /// </summary>
22+ /// <param name="steamStoreApiBaseUrl">Steam Store Web API URL</param>
1623 public SteamStoreRequest ( string steamStoreApiBaseUrl )
1724 {
1825 if ( String . IsNullOrEmpty ( steamStoreApiBaseUrl ) )
@@ -23,13 +30,26 @@ public SteamStoreRequest(string steamStoreApiBaseUrl)
2330 this . steamStoreApiBaseUrl = steamStoreApiBaseUrl ;
2431 }
2532
33+ /// <summary>
34+ /// Sends a request to a Steam Store Web API endpoint
35+ /// </summary>
36+ /// <typeparam name="T">Type of object which will be deserialized from the response</typeparam>
37+ /// <param name="endpointName">Endpoint to call on the interface</param>
38+ /// <returns></returns>
2639 public async Task < T > SendStoreRequestAsync < T > ( string endpointName )
2740 {
2841 Debug . Assert ( ! String . IsNullOrEmpty ( endpointName ) ) ;
2942
3043 return await SendStoreRequestAsync < T > ( endpointName , null ) ;
3144 }
3245
46+ /// <summary>
47+ /// Sends a request to a Steam Store Web API endpoint with parameters
48+ /// </summary>
49+ /// <typeparam name="T">Type of object which will be deserialized from the response</typeparam>
50+ /// <param name="endpointName">Endpoint to call on the interface</param>
51+ /// <param name="parameters">Parameters to pass to the endpoint</param>
52+ /// <returns>Deserialized response object</returns>
3353 public async Task < T > SendStoreRequestAsync < T > ( string endpointName , IList < SteamWebRequestParameter > parameters )
3454 {
3555 Debug . Assert ( ! String . IsNullOrEmpty ( endpointName ) ) ;
@@ -47,6 +67,11 @@ public async Task<T> SendStoreRequestAsync<T>(string endpointName, IList<SteamWe
4767 return deserializedResult ;
4868 }
4969
70+ /// <summary>
71+ /// Returns a string from an HTTP request and removes tabs and newlines
72+ /// </summary>
73+ /// <param name="command">Command (method endpoint) to send to an interface</param>
74+ /// <returns>HTTP response as a string without tabs and newlines</returns>
5075 private static async Task < string > GetHttpStringResponseAsync ( string command )
5176 {
5277 HttpClient httpClient = new HttpClient ( ) ;
@@ -56,6 +81,12 @@ private static async Task<string> GetHttpStringResponseAsync(string command)
5681 return response ;
5782 }
5883
84+ /// <summary>
85+ /// Builds a command to send with a request so that parameters and formats are correct
86+ /// </summary>
87+ /// <param name="endpointName">Endpoint to call on the interface</param>
88+ /// <param name="parameters">Parameters to send to the endpoint</param>
89+ /// <returns>Deserialized response object</returns>
5990 public string BuildRequestCommand ( string endpointName , IList < SteamWebRequestParameter > parameters )
6091 {
6192 Debug . Assert ( ! String . IsNullOrEmpty ( endpointName ) ) ;
0 commit comments