Class: Google::Apis::ChromewebstoreV2::ChromewebstoreService
- Inherits:
-
Google::Apis::Core::BaseService
- Object
- Google::Apis::Core::BaseService
- Google::Apis::ChromewebstoreV2::ChromewebstoreService
- Defined in:
- lib/google/apis/chromewebstore_v2/service.rb
Overview
Chrome Web Store API
The Chrome Web Store API provides access to data about apps and extensions, as well as developer tools for managing them.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://chromewebstore.$UNIVERSE_DOMAIN$/"
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
-
#cancel_item_submission(name, cancel_submission_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromewebstoreV2::CancelSubmissionResponse
Cancel the current active submission of an item if present.
-
#fetch_publisher_item_status(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromewebstoreV2::FetchItemStatusResponse
Fetch the status of an item.
-
#initialize ⇒ ChromewebstoreService
constructor
A new instance of ChromewebstoreService.
-
#publish_item(name, publish_item_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromewebstoreV2::PublishItemResponse
Submit the item to be published in the store.
-
#set_item_published_deploy_percentage(name, set_published_deploy_percentage_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromewebstoreV2::SetPublishedDeployPercentageResponse
Set a higher target deploy percentage for the item's published revision.
-
#upload_medium_item_package(name, upload_item_package_request_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromewebstoreV2::UploadItemPackageResponse
Upload a new package to an existing item.
Constructor Details
#initialize ⇒ ChromewebstoreService
Returns a new instance of ChromewebstoreService.
48 49 50 51 52 53 |
# File 'lib/google/apis/chromewebstore_v2/service.rb', line 48 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-chromewebstore_v2', client_version: Google::Apis::ChromewebstoreV2::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.
41 42 43 |
# File 'lib/google/apis/chromewebstore_v2/service.rb', line 41 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.
46 47 48 |
# File 'lib/google/apis/chromewebstore_v2/service.rb', line 46 def quota_user @quota_user end |
Instance Method Details
#cancel_item_submission(name, cancel_submission_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromewebstoreV2::CancelSubmissionResponse
Cancel the current active submission of an item if present. This can be used to cancel the review of a pending submission.
122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/google/apis/chromewebstore_v2/service.rb', line 122 def cancel_item_submission(name, cancel_submission_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+name}:cancelSubmission', ) command.request_representation = Google::Apis::ChromewebstoreV2::CancelSubmissionRequest::Representation command.request_object = cancel_submission_request_object command.response_representation = Google::Apis::ChromewebstoreV2::CancelSubmissionResponse::Representation command.response_class = Google::Apis::ChromewebstoreV2::CancelSubmissionResponse 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 |
#fetch_publisher_item_status(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromewebstoreV2::FetchItemStatusResponse
Fetch the status of an item.
155 156 157 158 159 160 161 162 163 |
# File 'lib/google/apis/chromewebstore_v2/service.rb', line 155 def fetch_publisher_item_status(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/{+name}:fetchStatus', ) command.response_representation = Google::Apis::ChromewebstoreV2::FetchItemStatusResponse::Representation command.response_class = Google::Apis::ChromewebstoreV2::FetchItemStatusResponse 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 |
#publish_item(name, publish_item_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromewebstoreV2::PublishItemResponse
Submit the item to be published in the store. The item will be submitted for
review unless skip_review is set to true, or the item is staged from a
previous submission with publish_type set to STAGED_PUBLISH.
189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/google/apis/chromewebstore_v2/service.rb', line 189 def publish_item(name, publish_item_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+name}:publish', ) command.request_representation = Google::Apis::ChromewebstoreV2::PublishItemRequest::Representation command.request_object = publish_item_request_object command.response_representation = Google::Apis::ChromewebstoreV2::PublishItemResponse::Representation command.response_class = Google::Apis::ChromewebstoreV2::PublishItemResponse 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 |
#set_item_published_deploy_percentage(name, set_published_deploy_percentage_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromewebstoreV2::SetPublishedDeployPercentageResponse
Set a higher target deploy percentage for the item's published revision. This will be updated without the item being submitted for review. This is only available to items with over 10,000 seven-day active users.
225 226 227 228 229 230 231 232 233 234 235 |
# File 'lib/google/apis/chromewebstore_v2/service.rb', line 225 def set_item_published_deploy_percentage(name, set_published_deploy_percentage_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/{+name}:setPublishedDeployPercentage', ) command.request_representation = Google::Apis::ChromewebstoreV2::SetPublishedDeployPercentageRequest::Representation command.request_object = set_published_deploy_percentage_request_object command.response_representation = Google::Apis::ChromewebstoreV2::SetPublishedDeployPercentageResponse::Representation command.response_class = Google::Apis::ChromewebstoreV2::SetPublishedDeployPercentageResponse 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_item_package(name, upload_item_package_request_object = nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ChromewebstoreV2::UploadItemPackageResponse
Upload a new package to an existing item.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/google/apis/chromewebstore_v2/service.rb', line 81 def upload_medium_item_package(name, upload_item_package_request_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, 'v2/{+name}:upload', ) else command = make_upload_command(:post, 'v2/{+name}:upload', ) command.upload_source = upload_source command.upload_content_type = content_type end command.request_representation = Google::Apis::ChromewebstoreV2::UploadItemPackageRequest::Representation command.request_object = upload_item_package_request_object command.response_representation = Google::Apis::ChromewebstoreV2::UploadItemPackageResponse::Representation command.response_class = Google::Apis::ChromewebstoreV2::UploadItemPackageResponse 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 |