Skip to content

Commit 3123b93

Browse files
committed
Removed PROJECT_ID from GCE/GAE example
1 parent 1311e0f commit 3123b93

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/site/resources/index.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,13 @@ <h4>Example: Retrieve Datastore Entries</h4>
145145

146146
// Authentication is automatic inside Google Compute Engine
147147
// and Google App Engine.
148-
DatastoreOptions options = DatastoreOptions.builder()
149-
.projectId(<span class="hljs-string">PROJECT_ID</span>)
150-
.build();
148+
DatastoreOptions options = DatastoreOptions.builder().build();
151149

152150
Datastore datastore = DatastoreFactory.instance().get(options);
153151
KeyFactory keyFactory = datastore.newKeyFactory().kind(<span class="hljs-string">KIND</span>);
154152
Key key = keyFactory.newKey(keyName);
155153
Entity entity = datastore.get(key);
154+
156155
</code></pre></div>
157156

158157
<div hljs="" language="java" ng-show="selected == 'elsewhere'" class=""><pre>
@@ -167,8 +166,7 @@ <h4>Example: Retrieve Datastore Entries</h4>
167166
DatastoreOptions options = DatastoreOptions.builder()
168167
.projectId(<span class="hljs-string">PROJECT_ID</span>)
169168
.authCredentials(AuthCredentials.createForJson(
170-
new FileInputStream(<span class="hljs-string">PATH_TO_JSON_KEY</span>)))
171-
.build();
169+
new FileInputStream(<span class="hljs-string">PATH_TO_JSON_KEY</span>))).build();
172170

173171
Datastore datastore = DatastoreFactory.instance().get(options);
174172
KeyFactory keyFactory = datastore.newKeyFactory().kind(<span class="hljs-string">KIND</span>);

0 commit comments

Comments
 (0)