/// <summary> /// The GetRequesterStatistic operation retrieves the value of one of several statistics /// about you (the Requester calling the operation). /// </summary> /// <param name="request">A <see cref="GetRequesterStatisticRequest"/> instance containing /// the request parameters</param> /// <returns> /// A <see cref="GetStatisticResult"/> instance /// </returns> /// <remarks> /// Mechanical Turk keeps track of many statistics about users and system activity. /// Statistics are calculated and recorded for each calendar day. GetRequesterStatistic /// can return data points for each of multiple days up to the current day, or an aggregate /// value for a longer time period up to the current day. /// <para></para> /// A single day's statistic represents the change in an overall value that has resulted /// from the day's activity. For example, the NumberAssignmentsApproved statistic reports /// the number of assignments you have approved in a given day. If you do not approve any /// assignments for a day, the value will be 0 for that day. If you approve fifty assignments /// that day, the value will be 50. /// </remarks> public GetStatisticResult GetRequesterStatistic(GetRequesterStatisticRequest request) { GetRequesterStatisticResponse response = (GetRequesterStatisticResponse)(this.SendRequest(request)); return response.GetStatisticResult[0]; }
/// <summary> /// See <a href="http://docs.amazonwebservices.com/AWSMechTurk/2012-03-25/AWSMturkAPI/ApiReference_GetRequesterStatisticOperation.html">online documentation for this operation.</a> /// </summary> /// <param name="statistic">A <see cref="RequesterStatistic"/> instance containing the request parameters</param> /// <param name="timePeriod">The time period.</param> /// <param name="count">The count.</param> /// <returns>A <see cref="DataPoint"/> list</returns> public IList<DataPoint> GetRequesterStatistic(RequesterStatistic statistic, TimePeriod? timePeriod, int? count) { GetRequesterStatisticRequest request = new GetRequesterStatisticRequest(); request.Statistic = statistic; if (timePeriod.HasValue) { request.TimePeriod = timePeriod.Value; request.TimePeriodSpecified = true; } if (count.HasValue) { request.Count = count.Value; request.CountSpecified = true; } DataPoint[] proxyResult = Proxy.GetRequesterStatistic(request).DataPoint; List<DataPoint> ret = new List<DataPoint>(proxyResult); return ret; }