Example #1
0
        /// <summary>
        /// The GetBlockedWorkers operation returns all of the Workers you have blocked using BlockWorker.
        /// </summary>
        /// <param name="request">A <see cref="GetBlockedWorkersRequest"/> instance 
        /// containing the request parameters</param>
        /// <returns>
        /// A <see cref="BlockWorkerResult"/> instance
        /// </returns>
        /// <remarks> Results are divided into numbered "pages," and a single page of results is 
        /// returned by the operation. Pagination can be controlled with parameters to the operation.</remarks>
        public GetBlockedWorkersResult GetBlockedWorkers(GetBlockedWorkersRequest request)
        {
            GetBlockedWorkersResponse response = (GetBlockedWorkersResponse)(this.SendRequest(request));

            return response.GetBlockedWorkersResult[0];
        }
Example #2
0
        /// <summary>
        /// See <a href="http://docs.amazonwebservices.com/AWSMechTurk/2012-03-25/AWSMturkAPI/ApiReference_GetBlockedWorkerOperation.html">online documentation for this operation.</a>
        /// </summary>
        /// <param name="pageNumber">The page number to return results from.</param>
        public List<WorkerBlock> GetBlockedWorkers(int pageNumber)
        {
            GetBlockedWorkersRequest request = new GetBlockedWorkersRequest();

            request.PageNumber = pageNumber;
            request.PageNumberSpecified = true;

            GetBlockedWorkersResult result = Proxy.GetBlockedWorkers(request);
            return (result.WorkerBlock == null) ? new List<WorkerBlock>() : new List<WorkerBlock>(result.WorkerBlock);
        }