Class: Google::Apis::DisplayvideoV2::DisplayVideoService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::DisplayvideoV2::DisplayVideoService
- Defined in:
- lib/google/apis/displayvideo_v2/service.rb
Overview
Display & Video 360 API
Display & Video 360 API allows users to automate complex Display & Video 360 workflows, such as creating insertion orders and setting targeting options for individual line items.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#download_medium(resource_name, fields: nil, quota_user: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DisplayvideoV2::GoogleBytestreamMedia
Downloads media.
-
#get_sdfdownloadtask_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DisplayvideoV2::Operation
Gets the latest state of an asynchronous SDF download task operation.
-
#initialize ⇒ DisplayVideoService
constructor
A new instance of DisplayVideoService.
-
#upload_medium(resource_name, google_bytestream_media_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DisplayvideoV2::GoogleBytestreamMedia
Uploads media.
Constructor Details
#initialize ⇒ DisplayVideoService
Returns a new instance of DisplayVideoService.
47 48 49 50 51 52 |
# File 'lib/google/apis/displayvideo_v2/service.rb', line 47 def initialize super('https://displayvideo.googleapis.com/', '', client_name: 'google-apis-displayvideo_v2', client_version: Google::Apis::DisplayvideoV2::GEM_VERSION) @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.
40 41 42 |
# File 'lib/google/apis/displayvideo_v2/service.rb', line 40 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.
45 46 47 |
# File 'lib/google/apis/displayvideo_v2/service.rb', line 45 def quota_user @quota_user end |
Instance Method Details
#download_medium(resource_name, fields: nil, quota_user: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DisplayvideoV2::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.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/google/apis/displayvideo_v2/service.rb', line 78 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::DisplayvideoV2::GoogleBytestreamMedia::Representation command.response_class = Google::Apis::DisplayvideoV2::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::DisplayvideoV2::Operation
Gets the latest state of an asynchronous SDF download task operation. Clients should poll this method at intervals of 30 seconds.
159 160 161 162 163 164 165 166 167 |
# File 'lib/google/apis/displayvideo_v2/service.rb', line 159 def get_sdfdownloadtask_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}', ) command.response_representation = Google::Apis::DisplayvideoV2::Operation::Representation command.response_class = Google::Apis::DisplayvideoV2::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 |
#upload_medium(resource_name, google_bytestream_media_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DisplayvideoV2::GoogleBytestreamMedia
Uploads media. Upload is supported on the URI /upload/media/resource_name=
?upload_type=media. **Note: Upload requests will not be successful without
including upload_type=media query string.
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/google/apis/displayvideo_v2/service.rb', line 120 def upload_medium(resource_name, google_bytestream_media_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:post, 'media/{+resourceName}', ) else command = make_upload_command(:post, 'media/{+resourceName}', ) command.upload_source = upload_source command.upload_content_type = content_type end command.request_representation = Google::Apis::DisplayvideoV2::GoogleBytestreamMedia::Representation command.request_object = google_bytestream_media_object command.response_representation = Google::Apis::DisplayvideoV2::GoogleBytestreamMedia::Representation command.response_class = Google::Apis::DisplayvideoV2::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 |