frogger
05/17/2022, 11:02 AMspreadsheets:read.all
We would use is e.g. as requireScope("spreadsheets:read.all")
I like plain text here over using constants like SPREADSHEETS_READ_ALL
because it stays in the domain language of the scope, rather than using the kotlin constant. But it would be great to have some sort of compile time check here so you cannot have a typo in the scope string. (They are all known ahead). Any ideas?Joffrey
05/17/2022, 11:57 AMScope.spreadsheets.readAll()
value class
to represent the scopes instead of the string type, to avoid mixing up with other stringsMatteo Mirk
05/17/2022, 12:33 PMimport Scopes.Spreadsheets
...
Spreadsheets.ReadAll
frogger
05/17/2022, 4:46 PMSpreadsheets.ReadAll
looks better than SPREADSHEETS_READ_ALL
.
Thanks for the suggestions. Not 100% what I prefer but a fair trade-ofMatteo Mirk
05/18/2022, 3:03 PM