Skip to content

Google Apps Script Snippet. SettingsService is an object designed for working with settings through PropertiesService and CacheService.

License

Notifications You must be signed in to change notification settings

MaksymStoianov/SettingsService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BG | DE | EN | RU | UK

SettingsService

SettingsService is an object designed for working with settings through PropertiesService and CacheService.

Installation

  1. Open your project in Google Apps Script Dashboard.
  2. Copy the contents of the index.js file and paste it into a new file in your Google Apps Script project.

Usage

Getting document settings instance

const settings = SettingsService.getDocumentSettings();
settings.email = 'stoianov.maksym@gmail.com';
Logger.log(settings.email);

Getting script settings instance

const settings = SettingsService.getScriptSettings();
settings.email = 'stoianov.maksym@gmail.com';
Logger.log(settings.email);

Getting user settings instance

const settings = SettingsService.getUserSettings();
settings.email = 'stoianov.maksym@gmail.com';
Logger.log(settings.email);

Tasks

  • Use recursive proxy to track object changes in Settings._values.
  • Create setProperties() method.
  • Create getKeys() method.
  • Create getProperties() method.
  • Create deleteAllProperties() method.

Changelog

  • 1.1.0: Bug fixes. Improved JSDoc documentation.
  • 1.0.0: Release.

About

Google Apps Script Snippet. SettingsService is an object designed for working with settings through PropertiesService and CacheService.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published