Skip to content
This repository was archived by the owner on Nov 4, 2025. It is now read-only.

Commit 43c56e6

Browse files
committed
Merge pull request #6 from terotil/master
Parameterize auth scope
2 parents 3833961 + 40ebca4 commit 43c56e6

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

lib/sheets.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function authorize(options) {
1010
options.email,
1111
null,
1212
options.key,
13-
['https://spreadsheets.google.com/feeds/']
13+
[options.baseUrl]
1414
);
1515

1616
return new Promise(function(resolve, reject) {
@@ -46,7 +46,8 @@ Sheets.prototype.authorize = function() {
4646
if (!this.authorization || (this.authorization_expiry < new Date())) {
4747
this.authorization = authorize({
4848
email: this.email,
49-
key: this.key
49+
key: this.key,
50+
baseUrl: this.baseUrl
5051
});
5152

5253
this.authorization.then(function(authClient) {
@@ -281,4 +282,4 @@ Sheets.prototype.parseRangeInfo = function(str) {
281282
return rangeInfo;
282283
};
283284

284-
module.exports = Sheets;
285+
module.exports = Sheets;

0 commit comments

Comments
 (0)