tcqueue/tcqueue.go
func (queue *Queue) ClaimWork(provisionerId, workerType string, payload *ClaimWorkRequest) (*ClaimWorkResponse, error) {
	cd := tcclient.Client(*queue)
	responseObject, _, err := (&cd).APICall(payload, "POST", "/claim-work/"+url.QueryEscape(provisionerId)+"/"+url.QueryEscape(workerType), new(ClaimWorkResponse), nil)
	return responseObject.(*ClaimWorkResponse), err
}
func (queue *Queue) ClaimWork(provisionerId, workerType string, payload *ClaimWorkRequest) (*ClaimWorkResponse, error) {
	cd := tcclient.Client(*queue)
	responseObject, _, err := (&cd).APICall(payload, "POST", "/claim-work/"+url.QueryEscape(provisionerId)+"/"+url.QueryEscape(workerType), new(ClaimWorkResponse), nil)
	return responseObject.(*ClaimWorkResponse), err
}
// Claim pending task(s) for the given `provisionerId`/`workerType` queue.
//
// If any work is available (even if fewer than the requested number of
// tasks, this will return immediately. Otherwise, it will block for tens of
// seconds waiting for work.  If no work appears, it will return an emtpy
// list of tasks.  Callers should sleep a short while (to avoid denial of
// service in an error condition) and call the endpoint again.  This is a
// simple implementation of "long polling".
//
// Required scopes:
//   All of:
//   * queue:claim-work:<provisionerId>/<workerType>
//   * queue:worker-id:<workerGroup>/<workerId>
//
// See #claimWork