访问和操控脚本发布。
方法
| 方法 | 返回类型 | 简介 |
|---|---|---|
get | String | 返回 Web 应用的网址(如果已部署);否则返回 null。 |
is | Boolean | 如果脚本可作为 Web 应用访问,则返回 true。 |
详细文档
get Url()
返回 Web 应用的网址(如果已部署);否则返回 null。如果您运行的是开发模式 Web 应用,则此方法会返回开发模式网址。
// Mail the URL of the published web app. MailApp.sendMail( 'myself@example.com', 'My Snazzy App', `My new app is now available at ${ScriptApp.getService().getUrl()}`, );
返回
String - Web 应用的网址
is Enabled()
如果脚本可作为 Web 应用访问,则返回 true。
返回
Boolean - 如果脚本作为 Web 应用发布,则为 true;否则为 false