访问和操纵脚本发布。
方法
| 方法 | 返回类型 | 简介 |
|---|---|---|
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。