Class: Google::Apis::DisplayvideoV1::DisplayVideoService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::DisplayvideoV1::DisplayVideoService
- Defined in:
- generated/google/apis/displayvideo_v1/service.rb
Overview
Display & Video 360 API
Display & Video 360 API allows users to manage and create campaigns and reports.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#create_sdfdownloadtask_sdf_download_task(create_sdf_download_task_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DisplayvideoV1::Operation
Creates an SDF Download Task.
-
#download_medium(resource_name, fields: nil, quota_user: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DisplayvideoV1::GoogleBytestreamMedia
Downloads media.
-
#get_sdfdownloadtask_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DisplayvideoV1::Operation
Gets the latest state of an asynchronous SDF download task operation.
-
#initialize ⇒ DisplayVideoService
constructor
A new instance of DisplayVideoService.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ DisplayVideoService
Returns a new instance of DisplayVideoService.
46 47 48 49 |
# File 'generated/google/apis/displayvideo_v1/service.rb', line 46 def initialize super('https://displayvideo.googleapis.com/', '') @batch_path = 'batch' 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.
39 40 41 |
# File 'generated/google/apis/displayvideo_v1/service.rb', line 39 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.
44 45 46 |
# File 'generated/google/apis/displayvideo_v1/service.rb', line 44 def quota_user @quota_user end |
Instance Method Details
#create_sdfdownloadtask_sdf_download_task(create_sdf_download_task_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DisplayvideoV1::Operation
Creates an SDF Download Task. Returns an Operation. An SDF Download Task is a long-running, asynchronous operation. The metadata type of this operation is SdfDownloadTaskMetadata. If the request is successful, the response type of the operation is SdfDownloadTask. The response will not include the download files, which must be retrieved with media.download. The state of operation can be retrieved with sdfdownloadtask.operations.get. Any errors can be found in the error.message. Note that error.details is expected to be empty.
125 126 127 128 129 130 131 132 133 134 |
# File 'generated/google/apis/displayvideo_v1/service.rb', line 125 def create_sdfdownloadtask_sdf_download_task(create_sdf_download_task_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/sdfdownloadtasks', ) command.request_representation = Google::Apis::DisplayvideoV1::CreateSdfDownloadTaskRequest::Representation command.request_object = create_sdf_download_task_request_object command.response_representation = Google::Apis::DisplayvideoV1::Operation::Representation command.response_class = Google::Apis::DisplayvideoV1::Operation command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#download_medium(resource_name, fields: nil, quota_user: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DisplayvideoV1::GoogleBytestreamMedia
Downloads media. Download is supported on the URI /download/
resource_name=
?alt=media.
**Note: Download requests will not be successful without including alt=
media
query string.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'generated/google/apis/displayvideo_v1/service.rb', line 77 def download_medium(resource_name, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block) if download_dest.nil? command = make_simple_command(:get, 'download/{+resourceName}', ) else command = make_download_command(:get, 'download/{+resourceName}', ) command.download_dest = download_dest end command.response_representation = Google::Apis::DisplayvideoV1::GoogleBytestreamMedia::Representation command.response_class = Google::Apis::DisplayvideoV1::GoogleBytestreamMedia command.params['resourceName'] = resource_name unless resource_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_sdfdownloadtask_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DisplayvideoV1::Operation
Gets the latest state of an asynchronous SDF download task operation. Clients should poll this method at intervals of 30 seconds.
157 158 159 160 161 162 163 164 165 |
# File 'generated/google/apis/displayvideo_v1/service.rb', line 157 def get_sdfdownloadtask_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::DisplayvideoV1::Operation::Representation command.response_class = Google::Apis::DisplayvideoV1::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |