Skip to content

Commit

Permalink
chore: remove snippet leading whitespace (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
chingor13 authored Mar 19, 2020
1 parent c989e56 commit a9f6952
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions packages/google-cloud-asset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,32 +55,32 @@ npm install @google-cloud/asset
### Using the client library

```javascript
const util = require('util');
const {AssetServiceClient} = require('@google-cloud/asset');

const client = new AssetServiceClient();

async function quickstart() {
const projectId = await client.getProjectId();
const projectResource = `projects/${projectId}`;
// TODO(developer): Choose asset names, such as //storage.googleapis.com/[YOUR_BUCKET_NAME].
// const assetNames = ['ASSET_NAME1', 'ASSET_NAME2', ...];

const request = {
parent: projectResource,
assetNames: assetNames.split(','),
contentType: 'RESOURCE',
readTimeWindow: {
startTime: {
seconds: Math.floor(new Date().getTime() / 1000),
},
const util = require('util');
const {AssetServiceClient} = require('@google-cloud/asset');

const client = new AssetServiceClient();

async function quickstart() {
const projectId = await client.getProjectId();
const projectResource = `projects/${projectId}`;
// TODO(developer): Choose asset names, such as //storage.googleapis.com/[YOUR_BUCKET_NAME].
// const assetNames = ['ASSET_NAME1', 'ASSET_NAME2', ...];

const request = {
parent: projectResource,
assetNames: assetNames.split(','),
contentType: 'RESOURCE',
readTimeWindow: {
startTime: {
seconds: Math.floor(new Date().getTime() / 1000),
},
};
},
};

// Handle the operation using the promise pattern.
const result = await client.batchGetAssetsHistory(request);
// Do things with with the response.
console.log(util.inspect(result, {depth: null}));
// Handle the operation using the promise pattern.
const result = await client.batchGetAssetsHistory(request);
// Do things with with the response.
console.log(util.inspect(result, {depth: null}));

```
Expand Down

0 comments on commit a9f6952

Please sign in to comment.