Interface: GristDocAPI#
grist-plugin-api.GristDocAPI
Allows getting information from and interacting with the Grist document to which a plugin or widget is attached.
Table of contents#
Methods#
Methods#
applyUserActions#
▸ applyUserActions(actions, options?): Promise<any>
Applies an array of user actions.
Parameters#
| Name | Type |
|---|---|
actions |
any[][] |
options? |
any |
Returns#
Promise<any>
fetchTable#
▸ fetchTable(tableId): Promise<any>
Returns a complete table of data as GristData.RowRecords, including the ‘id’ column. Do not modify the returned arrays in-place, especially if used directly (not over RPC).
Parameters#
| Name | Type |
|---|---|
tableId |
string |
Returns#
Promise<any>
getAccessToken#
▸ getAccessToken(options): Promise<AccessTokenResult>
Get a token for out-of-band access to the document.
Parameters#
| Name | Type |
|---|---|
options |
AccessTokenOptions |
Returns#
Promise<AccessTokenResult>
getDocName#
▸ getDocName(): Promise<string>
Returns an identifier for the document.
Returns#
Promise<string>
listTables#
▸ listTables(): Promise<string[]>
Returns a sorted list of table IDs.
Returns#
Promise<string[]>