File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
auth/src/main/java/com/google/cloud/auth/samples Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 3131import java .io .FileInputStream ;
3232import java .io .IOException ;
3333
34- /** Demonstrate various ways to authenticate requests using Cloud Storage as an example call. */
34+ /** Demonstrate various ways to authenticate requests using Cloud Storage/Language as an example call. */
3535public class AuthExample {
3636 // [START auth_cloud_implicit]
3737 static void authImplicit () {
@@ -97,13 +97,12 @@ static void authApiKey(String apiKey) throws IOException {
9797 LanguageServiceSettings settings =
9898 LanguageServiceSettings .newBuilder ().setApiKey (apiKey ).build ();
9999 LanguageServiceClient client = LanguageServiceClient .create (settings );
100-
101100 Document document =
102101 Document .newBuilder ().setContent ("Hello World!" ).setType (Document .Type .PLAIN_TEXT ).build ();
103102
104103 AnalyzeSentimentResponse actualResponse = client .analyzeSentiment (document );
105- System . out . println ( "response " + actualResponse . getDocumentSentiment (). toString ());
106- System .exit ( 0 );
104+
105+ System .out . println ( actualResponse . getDocumentSentiment (). toString () );
107106 }
108107 // [END auth_cloud_api_keys]
109108
You can’t perform that action at this time.
0 commit comments