/// <summary> /// Runs a report for the request in the post body. /// </summary> /// <param name="body">The report request.</param> /// <returns>The report response.</returns> public async Task <RankedReportData> PostReport(RankedRequest body) { await AuthorizeClient(AuthValues); var uri = new Uri(BaseUri, "reports"); var response = await HttpClient.PostApiResponse <RankedReportData>(uri, body); if (response != null && response.HasValue) { return(response.Value); } throw new ApiException(response?.Error); }
public RankedRequest Build() { var reportRequest = new RankedRequest { Rsid = Rsid, Dimension = Dimension, Locale = Locale, Settings = Settings, MetricContainer = new ReportMetrics { Metrics = _metrics, MetricFilters = _metricFilters }, GlobalFilters = _reportFilters }; reportRequest.GlobalFilters.Add(_dateRangeFilter); return(reportRequest); }
public async Task <RankedResponse> GetRankedInfo([FromBody] RankedRequest request) { var rankedInfo = await _riotApi.GetRankedInfoAsync(request.Id, request.Region); return(rankedInfo); }