@@ -50,8 +50,8 @@ object each time you want to use it. The example below shows how to create a
5050service for the Google Drive API.
5151
5252 function getDriveService() {
53- // Create a new service with the given name. The name will be used when
54- // persisting the authorized token, so ensure it is unique within the
53+ // Create a new service with the given name. The name will be used when
54+ // persisting the authorized token, so ensure it is unique within the
5555 // scope of the property store.
5656 return OAuth2.createService('drive')
5757
@@ -66,7 +66,7 @@ service for the Google Drive API.
6666 // Set the project key of the script using this library.
6767 .setProjectKey('...')
6868
69- // Set the name of the callback function in the script referenced
69+ // Set the name of the callback function in the script referenced
7070 // above that should be invoked to complete the OAuth flow.
7171 .setCallbackFunction('authCallback')
7272
@@ -78,7 +78,7 @@ service for the Google Drive API.
7878
7979 // Below are Google-specific OAuth2 parameters.
8080
81- // Sets the login hint, which will prevent the account chooser screen
81+ // Sets the login hint, which will prevent the account chooser screen
8282 // from being shown to users logged in with multiple accounts.
8383 .setParam('login_hint', Session.getActiveUser().getEmail())
8484
@@ -102,7 +102,7 @@ The URL is generated by the service, using the function `getAuthorizationUrl()`.
102102 var authorizationUrl = driveService.getAuthorizationUrl();
103103 var template = HtmlService.createTemplate(
104104 '<a href="<?= authorizationUrl ?>" target="_blank">Authorize</a>. ' +
105- 'Refresh the page when authorization complete.');
105+ 'Reopen the sidebar when the authorization is complete.');
106106 template.authorizationUrl = authorizationUrl;
107107 var page = template.evaluate();
108108 DocumentApp.getUi().showSidebar(page);
@@ -154,25 +154,27 @@ differences in how they implement the standard it may be that some APIs
154154aren't compatible. If you find an API that it does't work with, open an issue or
155155fix the problem yourself and make a pull request against the source code.
156156
157- ## Other features
158- ####Reseting the Access Token
157+ ## Other features
158+
159+ #### Resetting the Access Token
159160
160161If you have an access token set and need to remove it from the property store
161- you can remove it with the ` reset() ` function. Before you can call reset you need
162- to set the property store.
162+ you can remove it with the ` reset() ` function. Before you can call reset you
163+ need to set the property store.
163164
164165 function clearService(){
165166 OAuth2.createService('drive')
166167 .setPropertyStore(PropertiesService.getUserProperties())
167168 .reset();
168169 }
169170
170- ####Setting the Token Format
171+ #### Setting the Token Format
171172
172173OAuth services can return a token in two ways: as JSON or an URL encoded
173- string. You can set which format the token is in with ` setTokenFormat(tokenFormat) ` .
174- There are two ENUMS to set the mode: ` TOKEN_FORMAT.FORM_URL_ENCODED ` and ` TOKEN_FORMAT.JSON ` .
175- JSON is set as default if no token format is chosen.
174+ string. You can set which format the token is in with
175+ ` setTokenFormat(tokenFormat) ` . There are two ENUMS to set the mode:
176+ ` TOKEN_FORMAT.FORM_URL_ENCODED ` and ` TOKEN_FORMAT.JSON ` . JSON is set as default
177+ if no token format is chosen.
176178
177179 function gitService() {
178180 return OAuth2.createService('git')
0 commit comments