Skip to main content

Basic

Creating an Instance

If you have created a GAS on a specific spreadsheet and want to work with that spreadsheet, you can create an instance as follows:

const gassma = new Gassma.GassmaClient();

Alternatively, if you have created a GAS in a location other than a spreadsheet, or if you want to work with a spreadsheet located elsewhere, you can create an instance by passing the target spreadsheet's ID as an argument:

const gassma = new Gassma.GassmaClient("XXXXXXXXXXXXXXXXXXX");

Initialization with an Options Object

When you need advanced configuration such as relation definitions or global omit, pass an options object:

const gassma = new Gassma.GassmaClient({
id: "XXXXXXXXXXXXXXXXXXX", // Optional
relations: {
// Relation definitions (see the relation definition reference for details)
},
omit: {
// Global omit settings (see the global omit reference for details)
Users: { password: true },
},
});
OptionDescriptionReference
idSpreadsheet ID (uses the active spreadsheet when omitted)-
relationsRelation definitionsRelation Definition
omitGlobal omit settingsGlobal omit
defaultsDefault values for fieldsdefaults
updatedAtAuto-update timestampsupdatedAt
ignoreField-level exclusionignore
ignoreSheetsSheet-level exclusionignore
mapField name mappingmap
mapSheetsSheet name mappingmap
autoincrementAuto-incrementautoincrement