-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(samples): add a quickstart (#88)
- Loading branch information
1 parent
6458e23
commit 69d2886
Showing
6 changed files
with
105 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
[//]: # "This README.md file is auto-generated, all changes to this file will be lost." | ||
[//]: # "To regenerate it, use `python -m synthtool`." | ||
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/> | ||
|
||
# [Google Cloud Data Labeling: Node.js Samples](https://github.com/googleapis/nodejs-datalabeling) | ||
|
||
[![Open in Cloud Shell][shell_img]][shell_link] | ||
|
||
|
||
|
||
## Table of Contents | ||
|
||
* [Before you begin](#before-you-begin) | ||
* [Samples](#samples) | ||
* [Get Datasets](#get-datasets) | ||
|
||
## Before you begin | ||
|
||
Before running the samples, make sure you've followed the steps outlined in | ||
[Using the client library](https://github.com/googleapis/nodejs-datalabeling#using-the-client-library). | ||
|
||
## Samples | ||
|
||
|
||
|
||
### Get Datasets | ||
|
||
Gets all available Datasets. | ||
|
||
View the [source code](https://github.com/googleapis/nodejs-datalabeling/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-datalabeling&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | ||
|
||
__Usage:__ | ||
|
||
|
||
`node quickstart.js` | ||
|
||
|
||
|
||
|
||
|
||
|
||
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png | ||
[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-datalabeling&page=editor&open_in_editor=samples/README.md | ||
[product-docs]: https://cloud.google.com/data-labeling/docs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
--- | ||
rules: | ||
node/no-unpublished-require: off | ||
no-empty: off | ||
env: | ||
mocha: true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright 2019 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
'use strict'; | ||
|
||
const {assert} = require('chai'); | ||
const {execSync} = require('child_process'); | ||
|
||
const exec = cmd => execSync(cmd, {encoding: 'utf8'}); | ||
|
||
describe('quickstart', () => { | ||
it('should run the quickstart', () => { | ||
const stdout = exec('node quickstart.js'); | ||
assert.include(stdout, 'Datasets:'); | ||
}); | ||
}); |