Skip to content

Use Alert Center scope constants#68

Merged
erickoledadevrel merged 4 commits into
googleworkspace:masterfrom
aozarov:master
Mar 26, 2019
Merged

Use Alert Center scope constants#68
erickoledadevrel merged 4 commits into
googleworkspace:masterfrom
aozarov:master

Conversation

@aozarov

@aozarov aozarov commented Mar 26, 2019

Copy link
Copy Markdown
Contributor

No description provided.


private static final String APPLICATION_NAME = "Google Admin SDK Alert Center API Java Quickstart";
private static final JsonFactory JSON_FACTORY = JacksonFactory.getDefaultInstance();
/**

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the previous SCOPES variable and comment, as it contains important information about how to handle scope changes.

.fromStream(in)
.createDelegated(delegatedAdminEmail)
.createScoped(SCOPES);
.createScoped(AlertCenterScopes.all());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We prefer that the sample uses the minimum scopes required, since it's a best practice. See the Gmail quickstart for an example:

https://github.com/gsuitedevs/java-samples/blob/master/gmail/quickstart/src/main/java/GmailQuickstart.java#L47

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

* Global instance of the scopes required by this quickstart. If modifying these scopes, delete
* your previously saved tokens/ folder.
* Global instance of the scopes required by this quickstart.
* If modifying these scopes, delete your previously saved tokens/folder.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There actually is supposed to be a space between these. The folder is named "tokens", and we are instructing that they delete the whole folder.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@erickoledadevrel erickoledadevrel merged commit 3f09cde into googleworkspace:master Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants