scriptapi

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client wraps the Google Apps Script API service.

func New

func New(ctx context.Context, httpClient *http.Client, opts ...option.ClientOption) (*Client, error)

New creates a new Script API client using the provided HTTP client.

func (*Client) CreateDeployment

func (c *Client) CreateDeployment(ctx context.Context, scriptID string, deploymentConfig *script.DeploymentConfig) (*script.Deployment, error)

CreateDeployment creates a deployment for the script project.

func (*Client) CreateProject

func (c *Client) CreateProject(ctx context.Context, title, parentID string) (*script.Project, error)

CreateProject creates a new Google Apps Script project.

func (*Client) CreateVersion

func (c *Client) CreateVersion(ctx context.Context, scriptID, description string) (*script.Version, error)

CreateVersion creates a new immutable version for the script project.

func (*Client) GetContent

func (c *Client) GetContent(ctx context.Context, scriptID string, versionNumber int64) (*script.Content, error)

GetContent retrieves the content of a Google Apps Script project.

func (*Client) GetProject

func (c *Client) GetProject(ctx context.Context, scriptID string) (*script.Project, error)

GetProject retrieves a Google Apps Script project by its script ID.

func (*Client) ListDeployments

func (c *Client) ListDeployments(ctx context.Context, scriptID string) ([]*script.Deployment, error)

ListDeployments lists deployments for the script project.

func (*Client) RunFunction

func (c *Client) RunFunction(ctx context.Context, scriptID, functionName string, params []any, devMode bool) (*script.Operation, error)

RunFunction runs an Apps Script function remotely.

func (*Client) UpdateContent

func (c *Client) UpdateContent(ctx context.Context, scriptID string, content *script.Content) (*script.Content, error)

UpdateContent updates the content of the Apps Script project identified by scriptID.

func (*Client) UpdateDeployment

func (c *Client) UpdateDeployment(ctx context.Context, scriptID, deploymentID string, deploymentConfig *script.DeploymentConfig) (*script.Deployment, error)

UpdateDeployment updates an existing deployment for the script project.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL