Class: Google::Apis::CoordinateV1::CoordinateService
- Inherits:
-
Google::Apis::Core::BaseService
- Object
- Google::Apis::Core::BaseService
- Google::Apis::CoordinateV1::CoordinateService
- Defined in:
- generated/google/apis/coordinate_v1/service.rb
Overview
Google Maps Coordinate API
Lets you view and manage jobs in a Coordinate team.
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 Google::Apis::Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#get_job(team_id, job_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::Job
Retrieves a job, including all the changes made to the job.
-
#get_schedule(team_id, job_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::Schedule
Retrieves the schedule for a job.
-
#initialize ⇒ CoordinateService
constructor
A new instance of CoordinateService.
-
#insert_job(team_id, address, lat, lng, title, job_object = nil, assignee: nil, custom_field: nil, customer_name: nil, customer_phone_number: nil, note: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::Job
Inserts a new job.
-
#list_custom_field_defs(team_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::ListCustomFieldDefResponse
Retrieves a list of custom field definitions for a team.
-
#list_jobs(team_id, max_results: nil, min_modified_timestamp_ms: nil, omit_job_changes: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::ListJobResponse
Retrieves jobs created or modified since the given timestamp.
-
#list_locations(team_id, worker_email, start_timestamp_ms, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::ListLocationResponse
Retrieves a list of locations for a worker.
-
#list_teams(admin: nil, dispatcher: nil, worker: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::ListTeamResponse
Retrieves a list of teams for a user.
-
#list_workers(team_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::ListWorkerResponse
Retrieves a list of workers in a team.
-
#patch_job(team_id, job_id, job_object = nil, address: nil, assignee: nil, custom_field: nil, customer_name: nil, customer_phone_number: nil, lat: nil, lng: nil, note: nil, progress: nil, title: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::Job
Updates a job.
-
#patch_schedule(team_id, job_id, schedule_object = nil, all_day: nil, duration: nil, end_time: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::Schedule
Replaces the schedule of a job with the provided schedule.
-
#update_job(team_id, job_id, job_object = nil, address: nil, assignee: nil, custom_field: nil, customer_name: nil, customer_phone_number: nil, lat: nil, lng: nil, note: nil, progress: nil, title: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::Job
Updates a job.
-
#update_schedule(team_id, job_id, schedule_object = nil, all_day: nil, duration: nil, end_time: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::Schedule
Replaces the schedule of a job with the provided schedule.
Methods inherited from Google::Apis::Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Constructor Details
#initialize ⇒ CoordinateService
Returns a new instance of CoordinateService.
51 52 53 |
# File 'generated/google/apis/coordinate_v1/service.rb', line 51 def initialize super('https://www.googleapis.com/', 'coordinate/v1/') 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/coordinate_v1/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/coordinate_v1/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/coordinate_v1/service.rb', line 49 def user_ip @user_ip end |
Instance Method Details
#get_job(team_id, job_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::Job
Retrieves a job, including all the changes made to the job.
116 117 118 119 120 121 122 123 124 125 126 |
# File 'generated/google/apis/coordinate_v1/service.rb', line 116 def get_job(team_id, job_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'teams/{teamId}/jobs/{jobId}', ) command.response_representation = Google::Apis::CoordinateV1::Job::Representation command.response_class = Google::Apis::CoordinateV1::Job command.params['teamId'] = team_id unless team_id.nil? command.params['jobId'] = job_id unless job_id.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_schedule(team_id, job_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::Schedule
Retrieves the schedule for a job.
471 472 473 474 475 476 477 478 479 480 481 |
# File 'generated/google/apis/coordinate_v1/service.rb', line 471 def get_schedule(team_id, job_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'teams/{teamId}/jobs/{jobId}/schedule', ) command.response_representation = Google::Apis::CoordinateV1::Schedule::Representation command.response_class = Google::Apis::CoordinateV1::Schedule command.params['teamId'] = team_id unless team_id.nil? command.params['jobId'] = job_id unless job_id.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_job(team_id, address, lat, lng, title, job_object = nil, assignee: nil, custom_field: nil, customer_name: nil, customer_phone_number: nil, note: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::Job
Inserts a new job. Only the state field of the job should be set.
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'generated/google/apis/coordinate_v1/service.rb', line 176 def insert_job(team_id, address, lat, lng, title, job_object = nil, assignee: nil, custom_field: nil, customer_name: nil, customer_phone_number: nil, note: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'teams/{teamId}/jobs', ) command.request_representation = Google::Apis::CoordinateV1::Job::Representation command.request_object = job_object command.response_representation = Google::Apis::CoordinateV1::Job::Representation command.response_class = Google::Apis::CoordinateV1::Job command.params['teamId'] = team_id unless team_id.nil? command.query['address'] = address unless address.nil? command.query['assignee'] = assignee unless assignee.nil? command.query['customField'] = custom_field unless custom_field.nil? command.query['customerName'] = customer_name unless customer_name.nil? command.query['customerPhoneNumber'] = customer_phone_number unless customer_phone_number.nil? command.query['lat'] = lat unless lat.nil? command.query['lng'] = lng unless lng.nil? command.query['note'] = note unless note.nil? command.query['title'] = title unless title.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_custom_field_defs(team_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::ListCustomFieldDefResponse
Retrieves a list of custom field definitions for a team.
79 80 81 82 83 84 85 86 87 88 |
# File 'generated/google/apis/coordinate_v1/service.rb', line 79 def list_custom_field_defs(team_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'teams/{teamId}/custom_fields', ) command.response_representation = Google::Apis::CoordinateV1::ListCustomFieldDefResponse::Representation command.response_class = Google::Apis::CoordinateV1::ListCustomFieldDefResponse command.params['teamId'] = team_id unless team_id.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_jobs(team_id, max_results: nil, min_modified_timestamp_ms: nil, omit_job_changes: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::ListJobResponse
Retrieves jobs created or modified since the given timestamp.
230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'generated/google/apis/coordinate_v1/service.rb', line 230 def list_jobs(team_id, max_results: nil, min_modified_timestamp_ms: nil, omit_job_changes: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'teams/{teamId}/jobs', ) command.response_representation = Google::Apis::CoordinateV1::ListJobResponse::Representation command.response_class = Google::Apis::CoordinateV1::ListJobResponse command.params['teamId'] = team_id unless team_id.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['minModifiedTimestampMs'] = unless .nil? command.query['omitJobChanges'] = omit_job_changes unless omit_job_changes.nil? command.query['pageToken'] = page_token unless page_token.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_locations(team_id, worker_email, start_timestamp_ms, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::ListLocationResponse
Retrieves a list of locations for a worker.
430 431 432 433 434 435 436 437 438 439 440 441 442 443 |
# File 'generated/google/apis/coordinate_v1/service.rb', line 430 def list_locations(team_id, worker_email, , max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'teams/{teamId}/workers/{workerEmail}/locations', ) command.response_representation = Google::Apis::CoordinateV1::ListLocationResponse::Representation command.response_class = Google::Apis::CoordinateV1::ListLocationResponse command.params['teamId'] = team_id unless team_id.nil? command.params['workerEmail'] = worker_email unless worker_email.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['startTimestampMs'] = unless .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_teams(admin: nil, dispatcher: nil, worker: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::ListTeamResponse
Retrieves a list of teams for a user.
620 621 622 623 624 625 626 627 628 629 630 631 |
# File 'generated/google/apis/coordinate_v1/service.rb', line 620 def list_teams(admin: nil, dispatcher: nil, worker: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'teams', ) command.response_representation = Google::Apis::CoordinateV1::ListTeamResponse::Representation command.response_class = Google::Apis::CoordinateV1::ListTeamResponse command.query['admin'] = admin unless admin.nil? command.query['dispatcher'] = dispatcher unless dispatcher.nil? command.query['worker'] = worker unless worker.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_workers(team_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::ListWorkerResponse
Retrieves a list of workers in a team.
657 658 659 660 661 662 663 664 665 666 |
# File 'generated/google/apis/coordinate_v1/service.rb', line 657 def list_workers(team_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'teams/{teamId}/workers', ) command.response_representation = Google::Apis::CoordinateV1::ListWorkerResponse::Representation command.response_class = Google::Apis::CoordinateV1::ListWorkerResponse command.params['teamId'] = team_id unless team_id.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_job(team_id, job_id, job_object = nil, address: nil, assignee: nil, custom_field: nil, customer_name: nil, customer_phone_number: nil, lat: nil, lng: nil, note: nil, progress: nil, title: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::Job
Updates a job. Fields that are set in the job state will be updated. This method supports patch semantics.
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 |
# File 'generated/google/apis/coordinate_v1/service.rb', line 298 def patch_job(team_id, job_id, job_object = nil, address: nil, assignee: nil, custom_field: nil, customer_name: nil, customer_phone_number: nil, lat: nil, lng: nil, note: nil, progress: nil, title: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'teams/{teamId}/jobs/{jobId}', ) command.request_representation = Google::Apis::CoordinateV1::Job::Representation command.request_object = job_object command.response_representation = Google::Apis::CoordinateV1::Job::Representation command.response_class = Google::Apis::CoordinateV1::Job command.params['teamId'] = team_id unless team_id.nil? command.params['jobId'] = job_id unless job_id.nil? command.query['address'] = address unless address.nil? command.query['assignee'] = assignee unless assignee.nil? command.query['customField'] = custom_field unless custom_field.nil? command.query['customerName'] = customer_name unless customer_name.nil? command.query['customerPhoneNumber'] = customer_phone_number unless customer_phone_number.nil? command.query['lat'] = lat unless lat.nil? command.query['lng'] = lng unless lng.nil? command.query['note'] = note unless note.nil? command.query['progress'] = progress unless progress.nil? command.query['title'] = title unless title.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_schedule(team_id, job_id, schedule_object = nil, all_day: nil, duration: nil, end_time: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::Schedule
Replaces the schedule of a job with the provided schedule. This method supports patch semantics.
520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 |
# File 'generated/google/apis/coordinate_v1/service.rb', line 520 def patch_schedule(team_id, job_id, schedule_object = nil, all_day: nil, duration: nil, end_time: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'teams/{teamId}/jobs/{jobId}/schedule', ) command.request_representation = Google::Apis::CoordinateV1::Schedule::Representation command.request_object = schedule_object command.response_representation = Google::Apis::CoordinateV1::Schedule::Representation command.response_class = Google::Apis::CoordinateV1::Schedule command.params['teamId'] = team_id unless team_id.nil? command.params['jobId'] = job_id unless job_id.nil? command.query['allDay'] = all_day unless all_day.nil? command.query['duration'] = duration unless duration.nil? command.query['endTime'] = end_time unless end_time.nil? command.query['startTime'] = start_time unless start_time.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_job(team_id, job_id, job_object = nil, address: nil, assignee: nil, custom_field: nil, customer_name: nil, customer_phone_number: nil, lat: nil, lng: nil, note: nil, progress: nil, title: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::Job
Updates a job. Fields that are set in the job state will be updated.
374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 |
# File 'generated/google/apis/coordinate_v1/service.rb', line 374 def update_job(team_id, job_id, job_object = nil, address: nil, assignee: nil, custom_field: nil, customer_name: nil, customer_phone_number: nil, lat: nil, lng: nil, note: nil, progress: nil, title: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'teams/{teamId}/jobs/{jobId}', ) command.request_representation = Google::Apis::CoordinateV1::Job::Representation command.request_object = job_object command.response_representation = Google::Apis::CoordinateV1::Job::Representation command.response_class = Google::Apis::CoordinateV1::Job command.params['teamId'] = team_id unless team_id.nil? command.params['jobId'] = job_id unless job_id.nil? command.query['address'] = address unless address.nil? command.query['assignee'] = assignee unless assignee.nil? command.query['customField'] = custom_field unless custom_field.nil? command.query['customerName'] = customer_name unless customer_name.nil? command.query['customerPhoneNumber'] = customer_phone_number unless customer_phone_number.nil? command.query['lat'] = lat unless lat.nil? command.query['lng'] = lng unless lng.nil? command.query['note'] = note unless note.nil? command.query['progress'] = progress unless progress.nil? command.query['title'] = title unless title.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_schedule(team_id, job_id, schedule_object = nil, all_day: nil, duration: nil, end_time: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CoordinateV1::Schedule
Replaces the schedule of a job with the provided schedule.
574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 |
# File 'generated/google/apis/coordinate_v1/service.rb', line 574 def update_schedule(team_id, job_id, schedule_object = nil, all_day: nil, duration: nil, end_time: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'teams/{teamId}/jobs/{jobId}/schedule', ) command.request_representation = Google::Apis::CoordinateV1::Schedule::Representation command.request_object = schedule_object command.response_representation = Google::Apis::CoordinateV1::Schedule::Representation command.response_class = Google::Apis::CoordinateV1::Schedule command.params['teamId'] = team_id unless team_id.nil? command.params['jobId'] = job_id unless job_id.nil? command.query['allDay'] = all_day unless all_day.nil? command.query['duration'] = duration unless duration.nil? command.query['endTime'] = end_time unless end_time.nil? command.query['startTime'] = start_time unless start_time.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 |