Beispiel #1
0
        /// <summary>
        /// The GetReviewableHITs operation retrieves the HITs that have a status of Reviewable, 
        /// or HITs that have a status of Reviewing, and that belong to the Requester calling 
        /// the operation.
        /// </summary>
        /// <param name="request">A <see cref="GetReviewableHITsRequest"/> instance containing 
        /// the request parameters</param>
        /// <returns>
        /// A <see cref="GetReviewableHITsResult"/> instance
        /// </returns>
        /// <remarks> You can use this operation to determine which of your HITs have results, 
        /// then retrieve those results with the GetAssignmentsForHIT operation. Once a HIT's 
        /// results have been retrieved and the assignments have been approved or rejected 
        /// (with ApproveAssignment or RejectAssignment), you can call DisposeHIT to remove 
        /// the HIT from the results of a call to GetReviewableHITs.</remarks>
        public GetReviewableHITsResult GetReviewableHITs(GetReviewableHITsRequest request)
        {
            GetReviewableHITsResponse response = (GetReviewableHITsResponse)(this.SendRequest(request));

            return response.GetReviewableHITsResult[0];
        }
Beispiel #2
0
        public static string GetReviewableHIT()
        {
            string ret = null;

            GetReviewableHITsRequest requestHits = new GetReviewableHITsRequest();
            GetReviewableHITsResponse responseHits = (GetReviewableHITsResponse)TestUtil.Client.SendRequest(requestHits);

            if (responseHits.GetReviewableHITsResult[0].NumResults > 0)
            {
               ret = responseHits.GetReviewableHITsResult[0].HIT[0].HITId;
            }

            return ret;
        }
Beispiel #3
0
        /// <summary>
        /// See <a href="http://docs.amazonwebservices.com/AWSMechTurk/2012-03-25/AWSMturkAPI/ApiReference_GetReviewableHITsOperation.html">online documentation for this operation.</a>
        /// </summary>
        /// <param name="hitTypeId">The hit type id.</param>
        /// <param name="status">The status.</param>
        /// <param name="sortDirection">The sort direction.</param>
        /// <param name="sortProperty">The sort property.</param>
        /// <param name="pageNumber">The page number.</param>
        /// <param name="pageSize">Size of the page.</param>
        /// <returns>
        /// A <see cref="GetReviewableHITsResult"/> instance
        /// </returns>
        public GetReviewableHITsResult GetReviewableHITs(string hitTypeId, ReviewableHITStatus? status,
            SortDirection? sortDirection, GetReviewableHITsSortProperty? sortProperty,
            int? pageNumber, int? pageSize)
        {
            GetReviewableHITsRequest request = new GetReviewableHITsRequest();
            request.HITTypeId = hitTypeId;
            if (status.HasValue)
            {
                request.Status = status.Value;
                request.StatusSpecified = true;
            }

            if (sortDirection.HasValue)
            {
                request.SortDirection = sortDirection.Value;
                request.SortDirectionSpecified = true;
            }

            if (sortProperty.HasValue)
            {
                request.SortProperty = sortProperty.Value;
                request.SortPropertySpecified = true;
            }

            if (pageNumber.HasValue)
            {
                request.PageNumber = pageNumber.Value;
                request.PageNumberSpecified = true;
            }

            if (pageSize.HasValue)
            {
                request.PageSize = pageSize.Value;
                request.PageSizeSpecified = true;
            }

            return Proxy.GetReviewableHITs(request);
        }