Skip to content

Commit e3bb44a

Browse files
committed
Updates for canonical name change
1 parent 80764fd commit e3bb44a

File tree

6 files changed

+21
-22
lines changed

6 files changed

+21
-22
lines changed

language/analysis/repo/com/google/apis/google-api-services-language/maven-metadata.xml

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
<artifactId>google-api-services-language</artifactId>
55
<versioning>
66
<versions>
7-
<version>v1-rev20161006-1.22.0-SNAPSHOT</version>
8-
<version>v1-rev20161103-1.22.0-SNAPSHOT</version>
7+
<version>v1-rev20161109-1.22.0-SNAPSHOT</version>
98
</versions>
10-
<lastUpdated>20161109022047</lastUpdated>
9+
<lastUpdated>20161110231925</lastUpdated>
1110
</versioning>
1211
</metadata>
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
<groupId>com.google.apis</groupId>
1010
<artifactId>google-api-services-language</artifactId>
11-
<version>v1-rev20161103-1.22.0-SNAPSHOT</version>
12-
<name>Google Cloud Natural Language API v1-rev20161103-1.22.0-SNAPSHOT</name>
11+
<version>v1-rev20161109-1.22.0-SNAPSHOT</version>
12+
<name>Google Cloud Natural Language API v1-rev20161109-1.22.0-SNAPSHOT</name>
1313
<packaging>jar</packaging>
1414

1515
<inceptionYear>2011</inceptionYear>
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22
<metadata modelVersion="1.1.0">
33
<groupId>com.google.apis</groupId>
44
<artifactId>google-api-services-language</artifactId>
5-
<version>v1-rev20161103-1.22.0-SNAPSHOT</version>
5+
<version>v1-rev20161109-1.22.0-SNAPSHOT</version>
66
<versioning>
77
<snapshot>
8-
<timestamp>20161109.022047</timestamp>
8+
<timestamp>20161110.231925</timestamp>
99
<buildNumber>1</buildNumber>
1010
</snapshot>
11-
<lastUpdated>20161109022047</lastUpdated>
11+
<lastUpdated>20161110231925</lastUpdated>
1212
<snapshotVersions>
1313
<snapshotVersion>
1414
<extension>jar</extension>
15-
<value>v1-rev20161103-1.22.0-20161109.022047-1</value>
16-
<updated>20161109022047</updated>
15+
<value>v1-rev20161109-1.22.0-20161110.231925-1</value>
16+
<updated>20161110231925</updated>
1717
</snapshotVersion>
1818
<snapshotVersion>
1919
<extension>pom</extension>
20-
<value>v1-rev20161103-1.22.0-20161109.022047-1</value>
21-
<updated>20161109022047</updated>
20+
<value>v1-rev20161109-1.22.0-20161110.231925-1</value>
21+
<updated>20161110231925</updated>
2222
</snapshotVersion>
2323
</snapshotVersions>
2424
</versioning>

language/analysis/src/main/java/com/google/cloud/language/samples/Analyze.java

+10-10
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import com.google.api.client.http.HttpRequestInitializer;
2323
import com.google.api.client.json.JsonFactory;
2424
import com.google.api.client.json.jackson2.JacksonFactory;
25-
import com.google.api.services.language.v1.CloudNaturalLanguageAPI;
26-
import com.google.api.services.language.v1.CloudNaturalLanguageAPIScopes;
25+
import com.google.api.services.language.v1.CloudNaturalLanguage;
26+
import com.google.api.services.language.v1.CloudNaturalLanguageScopes;
2727
import com.google.api.services.language.v1.model.AnalyzeEntitiesRequest;
2828
import com.google.api.services.language.v1.model.AnalyzeEntitiesResponse;
2929
import com.google.api.services.language.v1.model.AnalyzeSentimentRequest;
@@ -157,12 +157,12 @@ public static void printSyntax(PrintStream out, List<Token> tokens) {
157157
/**
158158
* Connects to the Natural Language API using Application Default Credentials.
159159
*/
160-
public static CloudNaturalLanguageAPI getLanguageService()
160+
public static CloudNaturalLanguage getLanguageService()
161161
throws IOException, GeneralSecurityException {
162162
GoogleCredential credential =
163-
GoogleCredential.getApplicationDefault().createScoped(CloudNaturalLanguageAPIScopes.all());
163+
GoogleCredential.getApplicationDefault().createScoped(CloudNaturalLanguageScopes.all());
164164
JsonFactory jsonFactory = JacksonFactory.getDefaultInstance();
165-
return new CloudNaturalLanguageAPI.Builder(
165+
return new CloudNaturalLanguage.Builder(
166166
GoogleNetHttpTransport.newTrustedTransport(),
167167
jsonFactory, new HttpRequestInitializer() {
168168
@Override
@@ -174,12 +174,12 @@ public void initialize(HttpRequest request) throws IOException {
174174
.build();
175175
}
176176

177-
private final CloudNaturalLanguageAPI languageApi;
177+
private final CloudNaturalLanguage languageApi;
178178

179179
/**
180180
* Constructs a {@link Analyze} which connects to the Cloud Natural Language API.
181181
*/
182-
public Analyze(CloudNaturalLanguageAPI languageApi) {
182+
public Analyze(CloudNaturalLanguage languageApi) {
183183
this.languageApi = languageApi;
184184
}
185185

@@ -191,7 +191,7 @@ public List<Entity> analyzeEntities(String text) throws IOException {
191191
new AnalyzeEntitiesRequest()
192192
.setDocument(new Document().setContent(text).setType("PLAIN_TEXT"))
193193
.setEncodingType("UTF16");
194-
CloudNaturalLanguageAPI.Documents.AnalyzeEntities analyze =
194+
CloudNaturalLanguage.Documents.AnalyzeEntities analyze =
195195
languageApi.documents().analyzeEntities(request);
196196

197197
AnalyzeEntitiesResponse response = analyze.execute();
@@ -205,7 +205,7 @@ public Sentiment analyzeSentiment(String text) throws IOException {
205205
AnalyzeSentimentRequest request =
206206
new AnalyzeSentimentRequest()
207207
.setDocument(new Document().setContent(text).setType("PLAIN_TEXT"));
208-
CloudNaturalLanguageAPI.Documents.AnalyzeSentiment analyze =
208+
CloudNaturalLanguage.Documents.AnalyzeSentiment analyze =
209209
languageApi.documents().analyzeSentiment(request);
210210

211211
AnalyzeSentimentResponse response = analyze.execute();
@@ -220,7 +220,7 @@ public List<Token> analyzeSyntax(String text) throws IOException {
220220
new AnalyzeSyntaxRequest()
221221
.setDocument(new Document().setContent(text).setType("PLAIN_TEXT"))
222222
.setEncodingType("UTF16");
223-
CloudNaturalLanguageAPI.Documents.AnalyzeSyntax analyze =
223+
CloudNaturalLanguage.Documents.AnalyzeSyntax analyze =
224224
languageApi.documents().analyzeSyntax(request);
225225
AnalyzeSyntaxResponse response = analyze.execute();
226226
return response.getTokens();

0 commit comments

Comments
 (0)