Пример #1
0
 /// <summary>
 /// The NotifyWorkers operation sends e-mail to one or more Workers, given the recipients' 
 /// Worker IDs.
 /// </summary>
 /// <param name="request">A <see cref="NotifyWorkersRequest"/> instance containing the 
 /// request parameters</param>
 /// <remarks>
 /// Worker IDs are included in the assignment data returned by GetAssignmentsForHIT. You can 
 /// send e-mail to any Worker who has ever submitted results for a HIT you created that you 
 /// have approved or rejected.
 /// <para></para>
 /// The e-mail sent to Workers includes your e-mail address as the "reply-to" address, so 
 /// Workers can respond to the e-mail</remarks>
 public void NotifyWorkers(NotifyWorkersRequest request)
 {
     this.SendRequest(request);
 }
Пример #2
0
        /// <summary>
        /// See <a href="http://docs.amazonwebservices.com/AWSMechTurk/2012-03-25/AWSMturkAPI/ApiReference_NotifyWorkersOperation.html">online documentation for this operation.</a>
        /// </summary>
        /// <param name="subject">The subject.</param>
        /// <param name="messageText">The message text.</param>
        /// <param name="workerIDs">The IDs of the workers to notify.</param>
        public void NotifyWorkers(string subject, string messageText, List<string> workerIDs)
        {
            if (workerIDs == null || workerIDs.Count == 0)
            {
                throw new ArgumentException("No worker IDs specified", "workerIDs");
            }

            NotifyWorkersRequest request = new NotifyWorkersRequest();
            request.MessageText = messageText;
            request.Subject = subject;
            request.WorkerId = workerIDs.ToArray();

            Proxy.NotifyWorkers(request);
        }