Allows scripts to store simple data in key-value pairs scoped to one script, one user of a
script, or one document in which an add-on is used. Properties cannot be shared between scripts.
For more information about when to use each type of property, see the guide to the Properties service.
// Sets three properties of different types.
var documentProperties = PropertiesService.getDocumentProperties();
var scriptProperties = PropertiesService.getScriptProperties();
var userProperties = PropertiesService.getUserProperties();
documentProperties.setProperty('DAYS_TO_FETCH', '5');
scriptProperties.setProperty('SERVER_URL', 'http://www.example.com/MyWeatherService/');
userProperties.setProperty('DISPLAY_UNITS', 'metric');
Allows scripts to store simple data in key-value pairs scoped to one script, one user of a script, or one document in which an add-on is used. Properties cannot be shared between scripts. For more information about when to use each type of property, see the guide to the Properties service.