Skip to content

Commit

Permalink
fix(docs): update READMEs with new samples (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe authored Aug 26, 2019
1 parent d02f8ab commit 47d50c1
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 8 deletions.
5 changes: 5 additions & 0 deletions packages/google-cloud-asset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,14 @@ has instructions for running the samples.
| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
| Create Feed | [source code](https://github.com/googleapis/nodejs-asset/blob/master/samples/createFeed.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-asset&page=editor&open_in_editor=samples/createFeed.js,samples/README.md) |
| Delete Feed | [source code](https://github.com/googleapis/nodejs-asset/blob/master/samples/deleteFeed.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-asset&page=editor&open_in_editor=samples/deleteFeed.js,samples/README.md) |
| Export Assets | [source code](https://github.com/googleapis/nodejs-asset/blob/master/samples/exportAssets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-asset&page=editor&open_in_editor=samples/exportAssets.js,samples/README.md) |
| Get Batch Asset History | [source code](https://github.com/googleapis/nodejs-asset/blob/master/samples/getBatchAssetHistory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-asset&page=editor&open_in_editor=samples/getBatchAssetHistory.js,samples/README.md) |
| Get Feed | [source code](https://github.com/googleapis/nodejs-asset/blob/master/samples/getFeed.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-asset&page=editor&open_in_editor=samples/getFeed.js,samples/README.md) |
| List Feeds | [source code](https://github.com/googleapis/nodejs-asset/blob/master/samples/listFeeds.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-asset&page=editor&open_in_editor=samples/listFeeds.js,samples/README.md) |
| Asset History Quickstart | [source code](https://github.com/googleapis/nodejs-asset/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-asset&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
| Update Feed | [source code](https://github.com/googleapis/nodejs-asset/blob/master/samples/updateFeed.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-asset&page=editor&open_in_editor=samples/updateFeed.js,samples/README.md) |
Expand Down
100 changes: 100 additions & 0 deletions packages/google-cloud-asset/samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@

* [Before you begin](#before-you-begin)
* [Samples](#samples)
* [Create Feed](#create-feed)
* [Delete Feed](#delete-feed)
* [Export Assets](#export-assets)
* [Get Batch Asset History](#get-batch-asset-history)
* [Get Feed](#get-feed)
* [List Feeds](#list-feeds)
* [Asset History Quickstart](#asset-history-quickstart)
* [Update Feed](#update-feed)

## Before you begin

Expand All @@ -25,6 +30,44 @@ Before running the samples, make sure you've followed the steps outlined in



### Create Feed

Create Feed.

View the [source code](https://github.com/googleapis/nodejs-asset/blob/master/samples/createFeed.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-asset&page=editor&open_in_editor=samples/createFeed.js,samples/README.md)

__Usage:__


`node createFeed <FEED_ID> "storage.googleapis.com/<BUCKET_NAME>", projects/<PROJECT_ID>/topics/<TOPIC_ID>`


-----




### Delete Feed

Delete Feed.

View the [source code](https://github.com/googleapis/nodejs-asset/blob/master/samples/deleteFeed.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-asset&page=editor&open_in_editor=samples/deleteFeed.js,samples/README.md)

__Usage:__


`node deleteFeed "project/<PROJECT_NUMBER>/feeds/<FEED_ID>"`


-----




### Export Assets

Export asserts to specified dump file path.
Expand Down Expand Up @@ -63,6 +106,44 @@ __Usage:__



### Get Feed

Get Feed.

View the [source code](https://github.com/googleapis/nodejs-asset/blob/master/samples/getFeed.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-asset&page=editor&open_in_editor=samples/getFeed.js,samples/README.md)

__Usage:__


`node getFeed "project/<PROJECT_NUMBER>/feeds/<FEED_ID>"`


-----




### List Feeds

List Feeds.

View the [source code](https://github.com/googleapis/nodejs-asset/blob/master/samples/listFeeds.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-asset&page=editor&open_in_editor=samples/listFeeds.js,samples/README.md)

__Usage:__


`node listFeeds`


-----




### Asset History Quickstart

Batch get history of assets.
Expand All @@ -77,6 +158,25 @@ __Usage:__
`node getBatchAssetHistory "storage.googleapis.com/<BUCKET_NAME>"`


-----




### Update Feed

Update Feed.

View the [source code](https://github.com/googleapis/nodejs-asset/blob/master/samples/updateFeed.js).

[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-asset&page=editor&open_in_editor=samples/updateFeed.js,samples/README.md)

__Usage:__


`node updateFeed "project/<PROJECT_NUMBER>/feeds/<FEED_ID>" projects/<PROJECT_ID>/topics/<TOPIC_ID>`





Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-asset/src/v1/asset_service_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class AssetServiceClient {

// Determine the client header string.
const clientHeader = [
`gl-node/${process.version}`,
`gl-node/${process.versions.node}`,
`grpc/${gaxGrpc.grpcVersion}`,
`gax/${gax.version}`,
`gapic/${VERSION}`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class AssetServiceClient {

// Determine the client header string.
const clientHeader = [
`gl-node/${process.version}`,
`gl-node/${process.versions.node}`,
`grpc/${gaxGrpc.grpcVersion}`,
`gax/${gax.version}`,
`gapic/${VERSION}`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class AssetServiceClient {

// Determine the client header string.
const clientHeader = [
`gl-node/${process.version}`,
`gl-node/${process.versions.node}`,
`grpc/${gaxGrpc.grpcVersion}`,
`gax/${gax.version}`,
`gapic/${VERSION}`,
Expand Down
10 changes: 5 additions & 5 deletions packages/google-cloud-asset/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-08-20T18:29:33.688849Z",
"updateTime": "2019-08-26T19:46:41.469341Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.33.0",
"dockerImage": "googleapis/artman@sha256:c6231efb525569736226b1f7af7565dbc84248efafb3692a5bb1d2d8a7975d53"
"version": "0.35.0",
"dockerImage": "googleapis/artman@sha256:97ef134b6b1cc2c21868960d3b4352524023fb25b61fc137ca0783ce3c08c2cd"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "7e56e8d4fec63bb04ab4f79a98f65b29f235a0a0",
"internalRef": "262242585"
"sha": "37c923effe8b002884466074f84bc4e78e6ade62",
"internalRef": "265474131"
}
},
{
Expand Down

0 comments on commit 47d50c1

Please sign in to comment.