gws-apps-script

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

apps-script (v1)

apps-script (v1)

PREREQUISITE: Read
../gws-shared/SKILL.md
for auth, global flags, and security rules. If missing, run
gws generate-skills
to create it.
bash
gws apps-script <resource> <method> [flags]
前置要求: 阅读
../gws-shared/SKILL.md
了解认证、全局标志和安全规则。如果该文件缺失,请运行
gws generate-skills
来创建它。
bash
gws apps-script <resource> <method> [flags]

Helper Commands

辅助命令

CommandDescription
+push
Upload local files to an Apps Script project
命令描述
+push
将本地文件上传到Apps Script项目

API Resources

API资源

processes

进程

  • list
    — List information about processes made by or on behalf of a user, such as process type and current status.
    • listScriptProcesses
      — List information about a script's executed processes, such as process type and current status.
  • list
    — 列出由用户发起或代表用户执行的进程信息,例如进程类型和当前状态。
    • listScriptProcesses
      — 列出脚本已执行进程的信息,例如进程类型和当前状态。

projects

项目

  • create
    — Creates a new, empty script project with no script files and a base manifest file.
    • get
      — Gets a script project's metadata.
    • getContent
      — Gets the content of the script project, including the code source and metadata for each script file.
    • getMetrics
      — Get metrics data for scripts, such as number of executions and active users.
    • updateContent
      — Updates the content of the specified script project. This content is stored as the HEAD version, and is used when the script is executed as a trigger, in the script editor, in add-on preview mode, or as a web app or Apps Script API in development mode. This clears all the existing files in the project.
    • deployments
      — Operations on the 'deployments' resource
    • versions
      — Operations on the 'versions' resource
  • create
    — 创建一个新的空脚本项目,不包含脚本文件,仅带有基础清单文件。
    • get
      — 获取脚本项目的元数据。
    • getContent
      — 获取脚本项目的内容,包括每个脚本文件的源代码和元数据。
    • getMetrics
      — 获取脚本的指标数据,例如执行次数和活跃用户数。
    • updateContent
      — 更新指定脚本项目的内容。此内容将存储为HEAD版本,当脚本作为触发器、在脚本编辑器中、在插件预览模式下,或作为开发模式下的Web应用或Apps Script API执行时,会使用该版本。此操作会清除项目中所有现有文件。
    • deployments
      — 对'deployments'资源的操作
    • versions
      — 对'versions'资源的操作

scripts

脚本

  • run
  • run

Discovering Commands

命令探索

Before calling any API method, inspect it:
bash
undefined
在调用任何API方法之前,请先查看其详情:
bash
undefined

Browse resources and methods

浏览资源和方法

gws apps-script --help
gws apps-script --help

Inspect a method's required params, types, and defaults

查看方法的必填参数、类型和默认值

gws schema apps-script.<resource>.<method>

Use `gws schema` output to build your `--params` and `--json` flags.
gws schema apps-script.<resource>.<method>

使用`gws schema`的输出来构建你的`--params`和`--json`标志。