Package

com.google.appsscript

base

Permalink

package base

Visibility
  1. Public
  2. All

Type Members

  1. trait Blob extends Object

    Permalink

    Blob A data interchange object for Apps Script services.

    Blob A data interchange object for Apps Script services.

    Annotations
    @RawJSType()
  2. trait BlobSource extends Object

    Permalink

    BlobSource Interface for objects that can export their data as a Blob.

    BlobSource Interface for objects that can export their data as a Blob. Implementing classes Name Brief description Attachment A Sites Attachment such as a file attached to a page. Blob A data interchange object for Apps Script services. Chart A Chart object, which can be embedded into documents, UI elements, or used as a static image. Document A document, containing rich text and elements such as tables and lists. EmbeddedChart Represents a chart that has been embedded into a Spreadsheet. File This class contains methods to get information about the file and modify its contents. File A file in Google Drive. GmailAttachment An attachment from Gmail. HTTPResponse This class allows users to access specific information on HTTP responses. HtmlOutput An HtmlOutput object that can be served from a script. InlineImage An element representing an embedded image. JdbcBlob A JDBC Blob. JdbcClob A JDBC Clob. Spreadsheet This class allows users to access and modify Google Sheets files. StaticMap Allows for the creation and decoration of static map images.

    Annotations
    @RawJSType()
  3. trait Browser extends Object

    Permalink

    Browser This class provides access to Google Apps specific dialog boxes.

    Browser This class provides access to Google Apps specific dialog boxes. The methods in this class are only available for use in the context of a Google Spreadsheet. See also ButtonSet

    Annotations
    @RawJSType()
  4. trait Button extends Object

    Permalink

    Button An enum representing predetermined, localized dialog buttons returned by an alert or PromptResponse.getSelectedButton() to indicate which button in a dialog the user clicked.

    Button An enum representing predetermined, localized dialog buttons returned by an alert or PromptResponse.getSelectedButton() to indicate which button in a dialog the user clicked. These values cannot be set; to add buttons to an alert or prompt, use ButtonSet instead. // Display a dialog box with a message and "Yes" and "No" buttons. var ui = DocumentApp.getUi(); var response = ui.alert('Are you sure you want to continue?', ui.ButtonSet.YES_NO);

    // Process the user's response. if (response == ui.Button.YES) { Logger.log('The user clicked "Yes."'); } else { Logger.log('The user clicked "No" or the dialog\'s close button.'); }

    Annotations
    @RawJSType()
  5. trait ButtonSet extends Object

    Permalink

    ButtonSet An enum representing predetermined, localized sets of one or more dialog buttons that can be added to an alert or a prompt.

    ButtonSet An enum representing predetermined, localized sets of one or more dialog buttons that can be added to an alert or a prompt. To determine which button the user clicked, use Button. // Display a dialog box with a message and "Yes" and "No" buttons. var ui = DocumentApp.getUi(); var response = ui.alert('Are you sure you want to continue?', ui.ButtonSet.YES_NO);

    // Process the user's response. if (response == ui.Button.YES) { Logger.log('The user clicked "Yes."'); } else { Logger.log('The user clicked "No" or the dialog\'s close button.'); }

    Annotations
    @RawJSType()
  6. trait Logger extends Object

    Permalink

    Logger This class allows the developer to write out text to the debugging logs.

    Logger This class allows the developer to write out text to the debugging logs.

    Annotations
    @RawJSType()
  7. trait Menu extends Object

    Permalink

    Menu A custom menu in an instance of the user interface for a Google App.

    Menu A custom menu in an instance of the user interface for a Google App. A script can only interact with the UI for the current instance of an open document or form, and only if the script is container-bound to the document or form. For more information, see the guide to menus. // Add a custom menu to the active spreadsheet, including a separator and a sub-menu. function onOpen(e) { SpreadsheetApp.getUi() .createMenu('My Menu') .addItem('My Menu Item', 'myFunction') .addSeparator() .addSubMenu(SpreadsheetApp.getUi().createMenu('My Submenu') .addItem('One Submenu Item', 'mySecondFunction') .addItem('Another Submenu Item', 'myThirdFunction')) .addToUi(); }

    Annotations
    @RawJSType()
  8. trait MimeType extends Object

    Permalink

    MimeType An enumeration that provides access to MIME-type declarations without typing the strings explicitly.

    MimeType An enumeration that provides access to MIME-type declarations without typing the strings explicitly. Any method that expects a MIME type rendered as a string (for example, 'image/png') will also accept one of the values below, so long as the method supports the underlying MIME type. // Use MimeType enum to log the name of every Google Doc in the user's Drive. var docs = DriveApp.getFilesByType(MimeType.GOOGLE_DOCS); while (docs.hasNext()) { var doc = docs.next(); Logger.log(doc.getName()) }

    // Use plain string to log the size of every PNG in the user's Drive. var pngs = DriveApp.getFilesByType('image/png'); while (pngs.hasNext()) { var png = pngs.next(); Logger.log(png.getSize()); }

    Annotations
    @RawJSType()
  9. trait Month extends Object

    Permalink

    Month An enum representing the months of the year.

    Month An enum representing the months of the year.

    Annotations
    @RawJSType()
  10. trait PromptResponse extends Object

    Permalink

    PromptResponse A response to a prompt dialog displayed in the user-interface environment for a Google App.

    PromptResponse A response to a prompt dialog displayed in the user-interface environment for a Google App. The response contains any text the user entered in the dialog's input field and indicates which button the user clicked to dismiss the dialog. // Display a dialog box with a title, message, input field, and "Yes" and "No" buttons. The // user can also close the dialog by clicking the close button in its title bar. var ui = DocumentApp.getUi(); var response = ui.prompt('Getting to know you', 'May I know your name?', ui.ButtonSet.YES_NO);

    // Process the user's response. if (response.getSelectedButton() == ui.Button.YES) { Logger.log('The user\'s name is %s.', response.getResponseText()); } else if (response.getSelectedButton() == ui.Button.NO) { Logger.log('The user didn\'t want to provide a name.'); } else { Logger.log('The user clicked the close button in the dialog\'s title bar.'); }

    Annotations
    @RawJSType()
  11. trait Session extends Object

    Permalink

    Session The Session class provides access to session information, such as the user's email address (in some circumstances) and language setting.

    Session The Session class provides access to session information, such as the user's email address (in some circumstances) and language setting.

    Annotations
    @RawJSType()
  12. trait Ui extends Object

    Permalink

    Ui An instance of the user-interface environment for a Google App that allows the script to add features like menus, dialogs, and sidebars.

    Ui An instance of the user-interface environment for a Google App that allows the script to add features like menus, dialogs, and sidebars. A script can only interact with the UI for the current instance of an open editor, and only if the script is container-bound to the editor. // Display a dialog box with a title, message, input field, and "Yes" and "No" buttons. The // user can also close the dialog by clicking the close button in its title bar. var ui = SpreadsheetApp.getUi(); var response = ui.prompt('Getting to know you', 'May I know your name?', ui.ButtonSet.YES_NO);

    // Process the user's response. if (response.getSelectedButton() == ui.Button.YES) { Logger.log('The user\'s name is %s.', response.getResponseText()); } else if (response.getSelectedButton() == ui.Button.NO) { Logger.log('The user didn\'t want to provide a name.'); } else { Logger.log('The user clicked the close button in the dialog\'s title bar.'); }

    Annotations
    @RawJSType()
  13. trait User extends Object

    Permalink

    User Representation of a user, suitable for scripting.

    User Representation of a user, suitable for scripting.

    Annotations
    @RawJSType()
  14. trait Weekday extends Object

    Permalink

    Weekday An enum representing the days of the week.

    Weekday An enum representing the days of the week.

    Annotations
    @RawJSType()

Value Members

  1. object Logger extends Object with Logger

    Permalink

    Logger singleton

Ungrouped