Movatterモバイル変換


[0]ホーム

URL:


chromewebstore

package
v0.257.0Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2025 License:BSD-3-ClauseImports:18Imported by:0

Details

Repository

github.com/googleapis/google-api-go-client

Links

Documentation

Overview

Package chromewebstore provides access to the Chrome Web Store API.

For product documentation, see:https://developer.chrome.com/docs/webstore/api

Library status

These client libraries are officially supported by Google. However, thislibrary is considered complete and is in maintenance mode. This meansthat we will address critical bugs and security issues but will not addany new features.

When possible, we recommend using our newer[Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)that are still actively being worked and iterated on.

Creating a client

Usage example:

import "google.golang.org/api/chromewebstore/v2"...ctx := context.Background()chromewebstoreService, err := chromewebstore.NewService(ctx)

In this example, Google Application Default Credentials are used forauthentication. For information on how to create and obtain ApplicationDefault Credentials, seehttps://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

By default, all available scopes (see "Constants") are used to authenticate.To restrict scopes, usegoogle.golang.org/api/option.WithScopes:

chromewebstoreService, err := chromewebstore.NewService(ctx, option.WithScopes(chromewebstore.ChromewebstoreReadonlyScope))

To use an API key for authentication (note: some APIs do not support APIkeys), usegoogle.golang.org/api/option.WithAPIKey:

chromewebstoreService, err := chromewebstore.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuthflow, usegoogle.golang.org/api/option.WithTokenSource:

config := &oauth2.Config{...}// ...token, err := config.Exchange(ctx, ...)chromewebstoreService, err := chromewebstore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

Seegoogle.golang.org/api/option.ClientOption for details on options.

Index

Constants

View Source
const (// See, edit, update, or publish your Chrome Web Store extensions, themes,// apps, and licences you have access toChromewebstoreScope = "https://www.googleapis.com/auth/chromewebstore"// See and download your Chrome Web Store extensions and apps, and see licenses// you have access toChromewebstoreReadonlyScope = "https://www.googleapis.com/auth/chromewebstore.readonly")

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

typeCancelSubmissionRequest

type CancelSubmissionRequest struct {}

CancelSubmissionRequest: Request message for CancelSubmission.

typeCancelSubmissionResponse

type CancelSubmissionResponse struct {// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`}

CancelSubmissionResponse: Response message for `CancelSubmission`.

typeDeployInfo

type DeployInfo struct {// DeployPercentage: Required. The current deploy percentage for the release// channel (nonnegative number between 0 and 100).DeployPercentageint64 `json:"deployPercentage,omitempty"`// ForceSendFields is a list of field names (e.g. "DeployPercentage") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "DeployPercentage") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

DeployInfo: Deployment information for a specific release channel. Used inrequests to update deployment parameters.

func (DeployInfo)MarshalJSON

func (sDeployInfo) MarshalJSON() ([]byte,error)

typeDistributionChannel

type DistributionChannel struct {// CrxVersion: The extension version provided in the manifest of the uploaded// package.CrxVersionstring `json:"crxVersion,omitempty"`// DeployPercentage: The current deploy percentage for the release channel// (nonnegative number between 0 and 100).DeployPercentageint64 `json:"deployPercentage,omitempty"`// ForceSendFields is a list of field names (e.g. "CrxVersion") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CrxVersion") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

DistributionChannel: Deployment information for a specific release channel

func (DistributionChannel)MarshalJSON

func (sDistributionChannel) MarshalJSON() ([]byte,error)

typeFetchItemStatusResponse

type FetchItemStatusResponse struct {// ItemId: Output only. The ID of the item.ItemIdstring `json:"itemId,omitempty"`// LastAsyncUploadState: Output only. The state of the last async upload for an// item. Only set when there has been an async upload for the item in the past// 24 hours.//// Possible values://   "UPLOAD_STATE_UNSPECIFIED" - The default value.//   "SUCCEEDED" - The upload succeeded.//   "IN_PROGRESS" - The upload is currently being processed.//   "FAILED" - The upload failed.//   "NOT_FOUND" - Used as the value of `lastAsyncUploadState` in a// `fetchStatus` response indicating that an upload attempt was not found.LastAsyncUploadStatestring `json:"lastAsyncUploadState,omitempty"`// Name: The name of the requested item.Namestring `json:"name,omitempty"`// PublicKey: The public key of the item, which may be generated by the store.PublicKeystring `json:"publicKey,omitempty"`// PublishedItemRevisionStatus: Output only. Status of the current published// revision of the item. Will be unset if the item is not published.PublishedItemRevisionStatus *ItemRevisionStatus `json:"publishedItemRevisionStatus,omitempty"`// SubmittedItemRevisionStatus: Status of the item revision submitted to be// published. Will be unset if the item has not been submitted for publishing// since the last successful publish.SubmittedItemRevisionStatus *ItemRevisionStatus `json:"submittedItemRevisionStatus,omitempty"`// TakenDown: If true, the item has been taken down for a policy violation.// Check the developer dashboard for details.TakenDownbool `json:"takenDown,omitempty"`// Warned: If true, the item has been warned for a policy violation and will be// taken down if not resolved. Check the developer dashboard for details.Warnedbool `json:"warned,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "ItemId") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ItemId") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

FetchItemStatusResponse: Response message for `FetchItemStatus`.

func (FetchItemStatusResponse)MarshalJSON

func (sFetchItemStatusResponse) MarshalJSON() ([]byte,error)

typeItemRevisionStatus

type ItemRevisionStatus struct {// DistributionChannels: Details on the package of the itemDistributionChannels []*DistributionChannel `json:"distributionChannels,omitempty"`// State: Output only. Current state of the item//// Possible values://   "ITEM_STATE_UNSPECIFIED" - Default value. This value is unused.//   "PENDING_REVIEW" - The item is pending review.//   "STAGED" - The item has been approved and is ready to be published.//   "PUBLISHED" - The item is published publicly.//   "PUBLISHED_TO_TESTERS" - The item is published to trusted testers.//   "REJECTED" - The item has been rejected for publishing.//   "CANCELLED" - The item submission has been cancelled.Statestring `json:"state,omitempty"`// ForceSendFields is a list of field names (e.g. "DistributionChannels") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "DistributionChannels") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ItemRevisionStatus: Details on the status of an item revision.

func (ItemRevisionStatus)MarshalJSON

func (sItemRevisionStatus) MarshalJSON() ([]byte,error)

typeMediaService

type MediaService struct {// contains filtered or unexported fields}

funcNewMediaService

func NewMediaService(s *Service) *MediaService

func (*MediaService)Upload

func (r *MediaService) Upload(namestring, uploaditempackagerequest *UploadItemPackageRequest) *MediaUploadCall

Upload: Upload a new package to an existing item.

  • name: Name of the item to upload the new package to in the form`publishers/{publisherId}/items/{itemId}`.

typeMediaUploadCall

type MediaUploadCall struct {// contains filtered or unexported fields}

func (*MediaUploadCall)Context

Context sets the context to be used in this call's Do method.This context will supersede any context previously provided to theResumableMedia method.

func (*MediaUploadCall)Do

Do executes the "chromewebstore.media.upload" call.Any non-2xx status code is an error. Response headers are in either*UploadItemPackageResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.

func (*MediaUploadCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*MediaUploadCall)Header

func (c *MediaUploadCall) Header()http.Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*MediaUploadCall)Media

Media specifies the media to upload in one or more chunks. The chunk sizemay be controlled by supplying a MediaOption generated bygoogleapi.ChunkSize. The chunk size defaults togoogleapi.DefaultUploadChunkSize.The Content-Type header used in the uploadrequest will be determined by sniffing the contents of r, unless aMediaOption generated by googleapi.ContentType is supplied.At most one of Media and ResumableMedia may be set.

func (*MediaUploadCall)ProgressUpdater

ProgressUpdater provides a callback function that will be called after everychunk. It should be a low-latency function in order to not slow down theupload operation. This should only be called when using ResumableMedia (asopposed to Media).

func (*MediaUploadCall)ResumableMediadeprecated

func (c *MediaUploadCall) ResumableMedia(ctxcontext.Context, rio.ReaderAt, sizeint64, mediaTypestring) *MediaUploadCall

ResumableMedia specifies the media to upload in chunks and can be canceledwith ctx.

Deprecated: use Media instead.

At most one of Media and ResumableMedia may be set. mediaType identifies theMIME media type of the upload, such as "image/png". If mediaType is "", itwill be auto-detected. The provided ctx will supersede any contextpreviously provided to the Context method.

typePublishItemRequest

type PublishItemRequest struct {// DeployInfos: Optional. Additional deploy information including the desired// initial percentage rollout. Defaults to the current value saved in the// developer dashboard if unset.DeployInfos []*DeployInfo `json:"deployInfos,omitempty"`// PublishType: Optional. Use this to control if the item is published// immediately on approval or staged for publishing in the future. Defaults to// `DEFAULT_PUBLISH` if unset.//// Possible values://   "PUBLISH_TYPE_UNSPECIFIED" - Default value. This is the same as// DEFAULT_PUBLISH.//   "DEFAULT_PUBLISH" - The submission will be published immediately after// being approved.//   "STAGED_PUBLISH" - After approval the submission will be staged and can// then be published by the developer.PublishTypestring `json:"publishType,omitempty"`// SkipReview: Optional. Whether to attempt to skip item review. The API will// validate if the item qualifies and return a validation error if the item// requires review. Defaults to `false` if unset.SkipReviewbool `json:"skipReview,omitempty"`// ForceSendFields is a list of field names (e.g. "DeployInfos") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "DeployInfos") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

PublishItemRequest: Request message for PublishItem.

func (PublishItemRequest)MarshalJSON

func (sPublishItemRequest) MarshalJSON() ([]byte,error)

typePublishItemResponse

type PublishItemResponse struct {// ItemId: Output only. The ID of the item.ItemIdstring `json:"itemId,omitempty"`// Name: The name of the item that was submittedNamestring `json:"name,omitempty"`// State: Output only. The current state of the submission.//// Possible values://   "ITEM_STATE_UNSPECIFIED" - Default value. This value is unused.//   "PENDING_REVIEW" - The item is pending review.//   "STAGED" - The item has been approved and is ready to be published.//   "PUBLISHED" - The item is published publicly.//   "PUBLISHED_TO_TESTERS" - The item is published to trusted testers.//   "REJECTED" - The item has been rejected for publishing.//   "CANCELLED" - The item submission has been cancelled.Statestring `json:"state,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "ItemId") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ItemId") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

PublishItemResponse: Response message for `PublishItem`.

func (PublishItemResponse)MarshalJSON

func (sPublishItemResponse) MarshalJSON() ([]byte,error)

typePublishersItemsCancelSubmissionCall

type PublishersItemsCancelSubmissionCall struct {// contains filtered or unexported fields}

func (*PublishersItemsCancelSubmissionCall)Context

Context sets the context to be used in this call's Do method.

func (*PublishersItemsCancelSubmissionCall)Do

Do executes the "chromewebstore.publishers.items.cancelSubmission" call.Any non-2xx status code is an error. Response headers are in either*CancelSubmissionResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.

func (*PublishersItemsCancelSubmissionCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*PublishersItemsCancelSubmissionCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

typePublishersItemsFetchStatusCall

type PublishersItemsFetchStatusCall struct {// contains filtered or unexported fields}

func (*PublishersItemsFetchStatusCall)Context

Context sets the context to be used in this call's Do method.

func (*PublishersItemsFetchStatusCall)Do

Do executes the "chromewebstore.publishers.items.fetchStatus" call.Any non-2xx status code is an error. Response headers are in either*FetchItemStatusResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.

func (*PublishersItemsFetchStatusCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*PublishersItemsFetchStatusCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*PublishersItemsFetchStatusCall)IfNoneMatch

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

typePublishersItemsPublishCall

type PublishersItemsPublishCall struct {// contains filtered or unexported fields}

func (*PublishersItemsPublishCall)Context

Context sets the context to be used in this call's Do method.

func (*PublishersItemsPublishCall)Do

Do executes the "chromewebstore.publishers.items.publish" call.Any non-2xx status code is an error. Response headers are in either*PublishItemResponse.ServerResponse.Header or (if a response was returned atall) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified tocheck whether the returned error was because http.StatusNotModified wasreturned.

func (*PublishersItemsPublishCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*PublishersItemsPublishCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

typePublishersItemsService

type PublishersItemsService struct {// contains filtered or unexported fields}

funcNewPublishersItemsService

func NewPublishersItemsService(s *Service) *PublishersItemsService

func (*PublishersItemsService)CancelSubmission

func (r *PublishersItemsService) CancelSubmission(namestring, cancelsubmissionrequest *CancelSubmissionRequest) *PublishersItemsCancelSubmissionCall

CancelSubmission: Cancel the current active submission of an item ifpresent. This can be used to cancel the review of a pending submission.

  • name: Name of the item to cancel the submission of in the form`publishers/{publisherId}/items/{itemId}`.

func (*PublishersItemsService)FetchStatus

FetchStatus: Fetch the status of an item.

  • name: Name of the item to retrieve the status of in the form`publishers/{publisherId}/items/{itemId}`.

func (*PublishersItemsService)Publish

func (r *PublishersItemsService) Publish(namestring, publishitemrequest *PublishItemRequest) *PublishersItemsPublishCall

Publish: Submit the item to be published in the store. The item will besubmitted for review unless `skip_review` is set to true, or the item isstaged from a previous submission with `publish_type` set to`STAGED_PUBLISH`.

  • name: Name of the item in the form`publishers/{publisherId}/items/{itemId}`.

func (*PublishersItemsService)SetPublishedDeployPercentage

func (r *PublishersItemsService) SetPublishedDeployPercentage(namestring, setpublisheddeploypercentagerequest *SetPublishedDeployPercentageRequest) *PublishersItemsSetPublishedDeployPercentageCall

SetPublishedDeployPercentage: Set a higher target deploy percentage for theitem's published revision. This will be updated without the item beingsubmitted for review. This is only available to items with over 10,000seven-day active users.

  • name: Name of the item to update the published revision of in the form`publishers/{publisherId}/items/{itemId}`.

typePublishersItemsSetPublishedDeployPercentageCall

type PublishersItemsSetPublishedDeployPercentageCall struct {// contains filtered or unexported fields}

func (*PublishersItemsSetPublishedDeployPercentageCall)Context

Context sets the context to be used in this call's Do method.

func (*PublishersItemsSetPublishedDeployPercentageCall)Do

Do executes the "chromewebstore.publishers.items.setPublishedDeployPercentage" call.Any non-2xx status code is an error. Response headers are in either*SetPublishedDeployPercentageResponse.ServerResponse.Header or (if aresponse was returned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.

func (*PublishersItemsSetPublishedDeployPercentageCall)Fields

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*PublishersItemsSetPublishedDeployPercentageCall)Header

Header returns a http.Header that can be modified by the caller to addheaders to the request.

typePublishersService

type PublishersService struct {Items *PublishersItemsService// contains filtered or unexported fields}

funcNewPublishersService

func NewPublishersService(s *Service) *PublishersService

typeService

type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentMedia *MediaServicePublishers *PublishersService// contains filtered or unexported fields}

funcNewdeprecated

func New(client *http.Client) (*Service,error)

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead.To provide a custom HTTP client, use option.WithHTTPClient.If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

funcNewService

func NewService(ctxcontext.Context, opts ...option.ClientOption) (*Service,error)

NewService creates a new Service.

typeSetPublishedDeployPercentageRequest

type SetPublishedDeployPercentageRequest struct {// DeployPercentage: Required. Unscaled percentage value for the publised// revision (nonnegative number between 0 and 100). It must be larger than the// existing target percentage.DeployPercentageint64 `json:"deployPercentage,omitempty"`// ForceSendFields is a list of field names (e.g. "DeployPercentage") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "DeployPercentage") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

SetPublishedDeployPercentageRequest: Request message forSetPublishedDeployPercentage.

func (SetPublishedDeployPercentageRequest)MarshalJSON

typeSetPublishedDeployPercentageResponse

type SetPublishedDeployPercentageResponse struct {// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`}

SetPublishedDeployPercentageResponse: Response message for`SetPublishedDeployPercentage`.

typeUploadItemPackageRequest

type UploadItemPackageRequest struct {}

UploadItemPackageRequest: Request message for UploadItemPackage.

typeUploadItemPackageResponse

type UploadItemPackageResponse struct {// CrxVersion: The extension version provided in the manifest of the uploaded// package. This will not be set if the upload is still in progress// (`upload_state` is `UPLOAD_IN_PROGRESS`).CrxVersionstring `json:"crxVersion,omitempty"`// ItemId: Output only. The ID of the item the package was uploaded to.ItemIdstring `json:"itemId,omitempty"`// Name: The name of the item the package was uploaded to.Namestring `json:"name,omitempty"`// UploadState: Output only. The state of the upload. If `upload_state` is// `UPLOAD_IN_PROGRESS`, you can poll for updates using the fetchStatus method.//// Possible values://   "UPLOAD_STATE_UNSPECIFIED" - The default value.//   "SUCCEEDED" - The upload succeeded.//   "IN_PROGRESS" - The upload is currently being processed.//   "FAILED" - The upload failed.//   "NOT_FOUND" - Used as the value of `lastAsyncUploadState` in a// `fetchStatus` response indicating that an upload attempt was not found.UploadStatestring `json:"uploadState,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "CrxVersion") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "CrxVersion") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

UploadItemPackageResponse: Response message for `UploadItemPackage`.

func (UploadItemPackageResponse)MarshalJSON

func (sUploadItemPackageResponse) MarshalJSON() ([]byte,error)

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp