Class: Google::Apis::TaskqueueV1beta2::TaskqueueService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::TaskqueueV1beta2::TaskqueueService
- Defined in:
- generated/google/apis/taskqueue_v1beta2/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::TaskqueueV1beta2::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::TaskqueueV1beta2::TaskQueue
Get detailed information about a TaskQueue.
-
#initialize ⇒ TaskqueueService
constructor
A new instance of TaskqueueService.
-
#insert_task(project, taskqueue, task_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TaskqueueV1beta2::Task
Insert a new task in a TaskQueue.
-
#lease_task(project, taskqueue, num_tasks, lease_secs, group_by_tag: nil, tag: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TaskqueueV1beta2::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::TaskqueueV1beta2::Tasks2
List Tasks in a TaskQueue.
-
#patch_task(project, taskqueue, task, new_lease_seconds, task_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TaskqueueV1beta2::Task
Update tasks that are leased out of a TaskQueue.
-
#update_task(project, taskqueue, task, new_lease_seconds, task_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TaskqueueV1beta2::Task
Update tasks that are leased out of a TaskQueue.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Constructor Details
#initialize ⇒ TaskqueueService
Returns a new instance of TaskqueueService.
51 52 53 |
# File 'generated/google/apis/taskqueue_v1beta2/service.rb', line 51 def initialize super('https://www.googleapis.com/', 'taskqueue/v1beta2/projects/') 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_v1beta2/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_v1beta2/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_v1beta2/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.
124 125 126 127 128 129 130 131 132 133 |
# File 'generated/google/apis/taskqueue_v1beta2/service.rb', line 124 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::TaskqueueV1beta2::Task
Get a particular task from a TaskQueue.
163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'generated/google/apis/taskqueue_v1beta2/service.rb', line 163 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::TaskqueueV1beta2::Task::Representation command.response_class = Google::Apis::TaskqueueV1beta2::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::TaskqueueV1beta2::TaskQueue
Get detailed information about a TaskQueue.
83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'generated/google/apis/taskqueue_v1beta2/service.rb', line 83 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::TaskqueueV1beta2::TaskQueue::Representation command.response_class = Google::Apis::TaskqueueV1beta2::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 |
#insert_task(project, taskqueue, task_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TaskqueueV1beta2::Task
Insert a new task in a TaskQueue
203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'generated/google/apis/taskqueue_v1beta2/service.rb', line 203 def insert_task(project, taskqueue, task_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{project}/taskqueues/{taskqueue}/tasks', ) command.request_representation = Google::Apis::TaskqueueV1beta2::Task::Representation command.request_object = task_object command.response_representation = Google::Apis::TaskqueueV1beta2::Task::Representation command.response_class = Google::Apis::TaskqueueV1beta2::Task 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 |
#lease_task(project, taskqueue, num_tasks, lease_secs, group_by_tag: nil, tag: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TaskqueueV1beta2::Tasks
Lease 1 or more tasks from a TaskQueue.
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
# File 'generated/google/apis/taskqueue_v1beta2/service.rb', line 253 def lease_task(project, taskqueue, num_tasks, lease_secs, group_by_tag: nil, tag: nil, 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::TaskqueueV1beta2::Tasks::Representation command.response_class = Google::Apis::TaskqueueV1beta2::Tasks command.params['project'] = project unless project.nil? command.params['taskqueue'] = taskqueue unless taskqueue.nil? command.query['groupByTag'] = group_by_tag unless group_by_tag.nil? command.query['leaseSecs'] = lease_secs unless lease_secs.nil? command.query['numTasks'] = num_tasks unless num_tasks.nil? command.query['tag'] = tag unless tag.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::TaskqueueV1beta2::Tasks2
List Tasks in a TaskQueue
295 296 297 298 299 300 301 302 303 304 305 |
# File 'generated/google/apis/taskqueue_v1beta2/service.rb', line 295 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::TaskqueueV1beta2::Tasks2::Representation command.response_class = Google::Apis::TaskqueueV1beta2::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 |
#patch_task(project, taskqueue, task, new_lease_seconds, task_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TaskqueueV1beta2::Task
Update tasks that are leased out of a TaskQueue. This method supports patch semantics.
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 |
# File 'generated/google/apis/taskqueue_v1beta2/service.rb', line 337 def patch_task(project, taskqueue, task, new_lease_seconds, task_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, '{project}/taskqueues/{taskqueue}/tasks/{task}', ) command.request_representation = Google::Apis::TaskqueueV1beta2::Task::Representation command.request_object = task_object command.response_representation = Google::Apis::TaskqueueV1beta2::Task::Representation command.response_class = Google::Apis::TaskqueueV1beta2::Task command.params['project'] = project unless project.nil? command.params['taskqueue'] = taskqueue unless taskqueue.nil? command.params['task'] = task unless task.nil? command.query['newLeaseSeconds'] = new_lease_seconds unless new_lease_seconds.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 |
#update_task(project, taskqueue, task, new_lease_seconds, task_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::TaskqueueV1beta2::Task
Update tasks that are leased out of a TaskQueue.
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 |
# File 'generated/google/apis/taskqueue_v1beta2/service.rb', line 382 def update_task(project, taskqueue, task, new_lease_seconds, task_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{project}/taskqueues/{taskqueue}/tasks/{task}', ) command.request_representation = Google::Apis::TaskqueueV1beta2::Task::Representation command.request_object = task_object command.response_representation = Google::Apis::TaskqueueV1beta2::Task::Representation command.response_class = Google::Apis::TaskqueueV1beta2::Task command.params['project'] = project unless project.nil? command.params['taskqueue'] = taskqueue unless taskqueue.nil? command.params['task'] = task unless task.nil? command.query['newLeaseSeconds'] = new_lease_seconds unless new_lease_seconds.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 |