Class: Google::Apis::TaskqueueV1beta1::TaskqueueService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::TaskqueueV1beta1::TaskqueueService
- Defined in:
- generated/google/apis/taskqueue_v1beta1/service.rb
Overview
TaskQueue API
Accesses a Google App Engine Pull Task Queue over REST.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
-
#user_ip ⇒ String
IP address of the site where the request originates.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#delete_task(project, taskqueue, task, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Delete a task from a TaskQueue.
-
#get_task(project, taskqueue, task, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TaskqueueV1beta1::Task
Get a particular task from a TaskQueue.
-
#get_taskqueue(project, taskqueue, get_stats: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TaskqueueV1beta1::TaskQueue
Get detailed information about a TaskQueue.
-
#initialize ⇒ TaskqueueService
constructor
A new instance of TaskqueueService.
-
#lease_task(project, taskqueue, num_tasks, lease_secs, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TaskqueueV1beta1::Tasks
Lease 1 or more tasks from a TaskQueue.
-
#list_tasks(project, taskqueue, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TaskqueueV1beta1::Tasks2
List Tasks in a TaskQueue.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ TaskqueueService
Returns a new instance of TaskqueueService
51 52 53 54 |
# File 'generated/google/apis/taskqueue_v1beta1/service.rb', line 51 def initialize super('https://www.googleapis.com/', 'taskqueue/v1beta1/projects/') @batch_path = 'batch/taskqueue/v1beta1' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
38 39 40 |
# File 'generated/google/apis/taskqueue_v1beta1/service.rb', line 38 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
44 45 46 |
# File 'generated/google/apis/taskqueue_v1beta1/service.rb', line 44 def quota_user @quota_user end |
#user_ip ⇒ String
Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.
49 50 51 |
# File 'generated/google/apis/taskqueue_v1beta1/service.rb', line 49 def user_ip @user_ip end |
Instance Method Details
#delete_task(project, taskqueue, task, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Delete a task from a TaskQueue.
125 126 127 128 129 130 131 132 133 134 |
# File 'generated/google/apis/taskqueue_v1beta1/service.rb', line 125 def delete_task(project, taskqueue, task, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, '{project}/taskqueues/{taskqueue}/tasks/{task}', ) command.params['project'] = project unless project.nil? command.params['taskqueue'] = taskqueue unless taskqueue.nil? command.params['task'] = task unless task.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_task(project, taskqueue, task, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TaskqueueV1beta1::Task
Get a particular task from a TaskQueue.
164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'generated/google/apis/taskqueue_v1beta1/service.rb', line 164 def get_task(project, taskqueue, task, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{project}/taskqueues/{taskqueue}/tasks/{task}', ) command.response_representation = Google::Apis::TaskqueueV1beta1::Task::Representation command.response_class = Google::Apis::TaskqueueV1beta1::Task command.params['project'] = project unless project.nil? command.params['taskqueue'] = taskqueue unless taskqueue.nil? command.params['task'] = task unless task.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_taskqueue(project, taskqueue, get_stats: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TaskqueueV1beta1::TaskQueue
Get detailed information about a TaskQueue.
84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'generated/google/apis/taskqueue_v1beta1/service.rb', line 84 def get_taskqueue(project, taskqueue, get_stats: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{project}/taskqueues/{taskqueue}', ) command.response_representation = Google::Apis::TaskqueueV1beta1::TaskQueue::Representation command.response_class = Google::Apis::TaskqueueV1beta1::TaskQueue command.params['project'] = project unless project.nil? command.params['taskqueue'] = taskqueue unless taskqueue.nil? command.query['getStats'] = get_stats unless get_stats.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#lease_task(project, taskqueue, num_tasks, lease_secs, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TaskqueueV1beta1::Tasks
Lease 1 or more tasks from a TaskQueue.
207 208 209 210 211 212 213 214 215 216 217 218 219 |
# File 'generated/google/apis/taskqueue_v1beta1/service.rb', line 207 def lease_task(project, taskqueue, num_tasks, lease_secs, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{project}/taskqueues/{taskqueue}/tasks/lease', ) command.response_representation = Google::Apis::TaskqueueV1beta1::Tasks::Representation command.response_class = Google::Apis::TaskqueueV1beta1::Tasks command.params['project'] = project unless project.nil? command.params['taskqueue'] = taskqueue unless taskqueue.nil? command.query['leaseSecs'] = lease_secs unless lease_secs.nil? command.query['numTasks'] = num_tasks unless num_tasks.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_tasks(project, taskqueue, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TaskqueueV1beta1::Tasks2
List Tasks in a TaskQueue
247 248 249 250 251 252 253 254 255 256 257 |
# File 'generated/google/apis/taskqueue_v1beta1/service.rb', line 247 def list_tasks(project, taskqueue, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{project}/taskqueues/{taskqueue}/tasks', ) command.response_representation = Google::Apis::TaskqueueV1beta1::Tasks2::Representation command.response_class = Google::Apis::TaskqueueV1beta1::Tasks2 command.params['project'] = project unless project.nil? command.params['taskqueue'] = taskqueue unless taskqueue.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |