public async Task <object> Get(ReviewRequest request) { var parms = "?id=" + request.Id; if (request.MaxRating > 0) { parms += "&max=" + request.MaxRating; } if (request.MinRating > 0) { parms += "&min=" + request.MinRating; } if (request.MinRating > 0) { parms += "&limit=" + request.Limit; } if (request.ForceTitle) { parms += "&title=true"; } using (var result = await _httpClient.Get(MbAdminUrl + "/service/packageReview/retrieve" + parms, CancellationToken.None) .ConfigureAwait(false)) { var reviews = _serializer.DeserializeFromStream <List <PackageReviewInfo> >(result); return(ToOptimizedResult(reviews)); } }
public object Get(ReviewRequest request) { var parms = "?id=" + request.Id; if (request.MaxRating > 0) { parms += "&max=" + request.MaxRating; } if (request.MinRating > 0) { parms += "&min=" + request.MinRating; } if (request.MinRating > 0) { parms += "&limit=" + request.Limit; } if (request.ForceTitle) { parms += "&title=true"; } var result = _httpClient.Get(Constants.MbAdminUrl + "/service/packageReview/retrieve" + parms, CancellationToken.None).Result; var reviews = _serializer.DeserializeFromStream <List <PackageReviewInfo> >(result); return(ToOptimizedResult(reviews)); }