Class: Google::Apis::ChromewebstoreV2::ChromewebstoreService

Inherits:
Google::Apis::Core::BaseService
  • Object
show all
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.

Examples:

require 'google/apis/chromewebstore_v2'

Chromewebstore = Google::Apis::ChromewebstoreV2 # Alias the module
service = Chromewebstore::ChromewebstoreService.new

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://chromewebstore.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeChromewebstoreService

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

#keyString

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.

Returns:

  • (String)

    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_userString

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.

Returns:

  • (String)

    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.

Parameters:

  • name (String)

    Required. Name of the item to cancel the submission of in the form publishers/ publisherId/items/itemId``

  • cancel_submission_request_object (Google::Apis::ChromewebstoreV2::CancelSubmissionRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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', options)
  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.

Parameters:

  • name (String)

    Required. Name of the item to retrieve the status of in the form publishers/ publisherId/items/itemId``

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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', options)
  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.

Parameters:

  • name (String)

    Required. Name of the item in the form publishers/publisherId/items/itemId

  • publish_item_request_object (Google::Apis::ChromewebstoreV2::PublishItemRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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', options)
  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.

Parameters:

  • name (String)

    Required. Name of the item to update the published revision of in the form publishers/publisherId/items/itemId``

  • set_published_deploy_percentage_request_object (Google::Apis::ChromewebstoreV2::SetPublishedDeployPercentageRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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', options)
  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.

Parameters:

  • name (String)

    Required. Name of the item to upload the new package to in the form publishers/publisherId/items/itemId``

  • upload_item_package_request_object (Google::Apis::ChromewebstoreV2::UploadItemPackageRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • upload_source (IO, String) (defaults to: nil)

    IO stream or filename containing content to upload

  • content_type (String) (defaults to: nil)

    Content type of the uploaded content.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



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', options)
  else
    command = make_upload_command(:post, 'v2/{+name}:upload', options)
    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