Skip to content

Commit 840b08a

Browse files
JesseLovelacegcf-owl-bot[bot]alicejli
authored
docs: Fix broken links in readme (#1520)
* fix broken links in README * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update partials yaml * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix javadoc * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Alice <[email protected]>
1 parent b27008b commit 840b08a

File tree

3 files changed

+14
-34
lines changed

3 files changed

+14
-34
lines changed

.readme-partials.yaml

+4-13
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ custom_content: |
1414
Storage storage = StorageOptions.getDefaultInstance().getService();
1515
```
1616
17-
For other authentication options, see the [Authentication](https://github.com/googleapis/google-cloud-java#authentication) page.
17+
For other authentication options, see the [Authentication](https://github.com/googleapis/google-cloud-java#authentication) page in Google Cloud Java.
1818
1919
#### Storing data
2020
Stored objects are called "blobs" in `google-cloud` and are organized into containers called "buckets". `Blob`, a
@@ -51,7 +51,7 @@ custom_content: |
5151
```
5252
5353
A complete example for creating a blob can be found at
54-
[CreateBlob.java](https://github.com/googleapis/google-cloud-java/tree/main/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/CreateBlob.java).
54+
[UploadObject.java](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/UploadObject.java).
5555
5656
At this point, you will be able to see your newly created bucket and blob on the Google Developers Console.
5757
@@ -66,7 +66,7 @@ custom_content: |
6666
```
6767
6868
A complete example for accessing blobs can be found at
69-
[CreateBlob.java](https://github.com/googleapis/google-cloud-java/tree/main/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/CreateBlob.java).
69+
[DownloadObject.java](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/DownloadObject.java).
7070
7171
#### Updating data
7272
Another thing we may want to do is update a blob. The following snippet shows how to update a Storage blob if it exists.
@@ -83,9 +83,6 @@ custom_content: |
8383
}
8484
```
8585
86-
The complete source code can be found at
87-
[UpdateBlob.java](https://github.com/googleapis/google-cloud-java/tree/main/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/UpdateBlob.java).
88-
8986
#### Listing buckets and contents of buckets
9087
Suppose that you've added more buckets and blobs, and now you want to see the names of your buckets and the contents
9188
of each one. Add the following code to list all your buckets and all the blobs inside each bucket.
@@ -106,16 +103,10 @@ custom_content: |
106103
107104
#### Complete source code
108105
109-
In
110-
[CreateAndListBucketsAndBlobs.java](https://github.com/googleapis/google-cloud-java/tree/main/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/CreateAndListBucketsAndBlobs.java)
111-
we put together examples creating and listing buckets and blobs into one program. The program assumes that you are
112-
running on Compute Engine or from your own desktop. To run the example on App Engine, simply move
113-
the code from the main method to your application's servlet class and change the print statements to
114-
display on your webpage.
106+
See [ListObjects.java](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/ListObjects.java) for a complete example.
115107
116108
### Example Applications
117109
118-
- [`StorageExample`](https://github.com/googleapis/google-cloud-java/tree/main/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/StorageExample.java) is a simple command line interface that provides some of Cloud Storage's functionality. Read more about using the application on the [`StorageExample` docs page](https://github.com/googleapis/google-cloud-java/blob/main/google-cloud-examples/README.md).
119110
- [`Bookshelf`](https://github.com/GoogleCloudPlatform/getting-started-java/tree/main/bookshelf) - An App Engine application that manages a virtual bookshelf.
120111
- This app uses `google-cloud` to interface with Cloud Datastore and Cloud Storage. It also uses Cloud SQL, another Google Cloud Platform service.
121112
- [`Flexible Environment/Storage example`](https://github.com/GoogleCloudPlatform/java-docs-samples/tree/main/flexible/cloudstorage) - An app that uploads files to a public Cloud Storage bucket on the App Engine Flexible Environment runtime.

README.md

+4-13
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ import com.google.cloud.storage.StorageOptions;
112112
Storage storage = StorageOptions.getDefaultInstance().getService();
113113
```
114114

115-
For other authentication options, see the [Authentication](https://github.com/googleapis/google-cloud-java#authentication) page.
115+
For other authentication options, see the [Authentication](https://github.com/googleapis/google-cloud-java#authentication) page in Google Cloud Java.
116116

117117
#### Storing data
118118
Stored objects are called "blobs" in `google-cloud` and are organized into containers called "buckets". `Blob`, a
@@ -149,7 +149,7 @@ Blob blob = storage.create(blobInfo, "a simple blob".getBytes(UTF_8));
149149
```
150150

151151
A complete example for creating a blob can be found at
152-
[CreateBlob.java](https://github.com/googleapis/google-cloud-java/tree/main/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/CreateBlob.java).
152+
[UploadObject.java](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/UploadObject.java).
153153

154154
At this point, you will be able to see your newly created bucket and blob on the Google Developers Console.
155155

@@ -164,7 +164,7 @@ String contentString = new String(content, UTF_8);
164164
```
165165

166166
A complete example for accessing blobs can be found at
167-
[CreateBlob.java](https://github.com/googleapis/google-cloud-java/tree/main/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/CreateBlob.java).
167+
[DownloadObject.java](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/DownloadObject.java).
168168

169169
#### Updating data
170170
Another thing we may want to do is update a blob. The following snippet shows how to update a Storage blob if it exists.
@@ -181,9 +181,6 @@ if (blob != null) {
181181
}
182182
```
183183

184-
The complete source code can be found at
185-
[UpdateBlob.java](https://github.com/googleapis/google-cloud-java/tree/main/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/UpdateBlob.java).
186-
187184
#### Listing buckets and contents of buckets
188185
Suppose that you've added more buckets and blobs, and now you want to see the names of your buckets and the contents
189186
of each one. Add the following code to list all your buckets and all the blobs inside each bucket.
@@ -204,16 +201,10 @@ for (Bucket bucket : storage.list().iterateAll()) {
204201

205202
#### Complete source code
206203

207-
In
208-
[CreateAndListBucketsAndBlobs.java](https://github.com/googleapis/google-cloud-java/tree/main/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/CreateAndListBucketsAndBlobs.java)
209-
we put together examples creating and listing buckets and blobs into one program. The program assumes that you are
210-
running on Compute Engine or from your own desktop. To run the example on App Engine, simply move
211-
the code from the main method to your application's servlet class and change the print statements to
212-
display on your webpage.
204+
See [ListObjects.java](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/ListObjects.java) for a complete example.
213205

214206
### Example Applications
215207

216-
- [`StorageExample`](https://github.com/googleapis/google-cloud-java/tree/main/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/StorageExample.java) is a simple command line interface that provides some of Cloud Storage's functionality. Read more about using the application on the [`StorageExample` docs page](https://github.com/googleapis/google-cloud-java/blob/main/google-cloud-examples/README.md).
217208
- [`Bookshelf`](https://github.com/GoogleCloudPlatform/getting-started-java/tree/main/bookshelf) - An App Engine application that manages a virtual bookshelf.
218209
- This app uses `google-cloud` to interface with Cloud Datastore and Cloud Storage. It also uses Cloud SQL, another Google Cloud Platform service.
219210
- [`Flexible Environment/Storage example`](https://github.com/GoogleCloudPlatform/java-docs-samples/tree/main/flexible/cloudstorage) - An app that uploads files to a public Cloud Storage bucket on the App Engine Flexible Environment runtime.

google-cloud-storage/src/main/java/com/google/cloud/storage/package-info.java

+6-8
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@
1717
/**
1818
* A client for Cloud Storage - Unified object storage.
1919
*
20-
* <p>Here's a simple usage example for using google-cloud from App/Compute Engine. This example
21-
* shows how to create a Storage blob. For the complete source code see <a
22-
* href="https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/GetOrCreateBlob.java">
23-
* CreateBlob.java</a>.
20+
* <p>Here's a simple usage example the Java Storage client. This example shows how to create a
21+
* Storage object.
2422
*
2523
* <pre>{@code
2624
* Storage storage = StorageOptions.getDefaultInstance().getService();
@@ -29,10 +27,7 @@
2927
* Blob blob = storage.create(blobInfo, "Hello, Cloud Storage!".getBytes(UTF_8));
3028
* }</pre>
3129
*
32-
* <p>This second example shows how to update the blob's content if the blob exists. For the
33-
* complete source code see <a
34-
* href="https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/UpdateBlob.java">
35-
* UpdateBlob.java</a>.
30+
* <p>This second example shows how to update an object's content if the object exists.
3631
*
3732
* <pre>{@code
3833
* Storage storage = StorageOptions.getDefaultInstance().getService();
@@ -47,6 +42,9 @@
4742
* }
4843
* }</pre>
4944
*
45+
* <p>For more detailed code examples, see the <a
46+
* href="https://cloud.google.com/storage/docs/samples">sample library</a>.
47+
*
5048
* <p>When using google-cloud from outside of App/Compute Engine, you have to <a
5149
* href="https://github.com/googleapis/google-cloud-java#specifying-a-project-id">specify a project
5250
* ID</a> and <a href="https://github.com/googleapis/google-cloud-java#authentication">provide

0 commit comments

Comments
 (0)