-
Improved overall code quality using Fluent API Url Builders
-
Removed all Hardcoded API URL's
-
More Clean code
# Before V.0 (Initial commit)
var apiParams = filters.GetQueryParams();
var url = $"{_baseApiUrl}/answers?key={_apiKey}&{apiParams}";
var response = _httpClient.GetAsync(url).Result.Content.ReadAsStringAsync().Result;
var apiResult = response.DeserializeJson<Data<Answer>>().ValidateApiResponse();
return apiResult;
# After V1.1
var url = ApiUrlBuilder
.Initialize(_apiKey)
.ForClient(ClientType.Answers)
.WithFilter(filters)
.GetApiUrl();
var response = _httpClient.GetAsync(url).Result
.ReadAsJsonAsync<Data<Answer>>()
.ValidateApiResponse();
return response;
Nuget : https://www.nuget.org/packages/StackExchange.NET/1.1.0