Skip to content
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.

Commit

Permalink
feat: add initial samples (#2)
Browse files Browse the repository at this point in the history
* feat: add initial samples


Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
sofisl and gcf-owl-bot[bot] authored Jul 21, 2022
1 parent 4fd777b commit 2068ba5
Show file tree
Hide file tree
Showing 27 changed files with 200 additions and 132 deletions.
2 changes: 1 addition & 1 deletion .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

docker:
digest: sha256:3f802f47bce31df4ee6b9513ca085a049347dba6837a4bdfa411b77ae0a9bc43
image: gcr.io/repo-automation-bots/owlbot-nodejs:latest
image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Thanks for stopping by to let us know something could be better!
This is the client library for . We will only be able to assist with issues that pertain to the behaviors of this library. If the issue you're experiencing is due to the behavior of the product itself, please visit the [ Support page]() to reach the most relevant engineers.

2) Did someone already solve this?
- Search the issues already opened: https://github.com/googleapis/nodes-bigquery-migration/issues
- Search the issues already opened: https://github.com/googleapis/nodejs-bigquery-migration/issues
- Search the issues on our "catch-all" repository: https://github.com/googleapis/google-cloud-node
- Search or ask on StackOverflow (engineers monitor these tags): http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js

Expand All @@ -26,7 +26,7 @@ If the support paths suggested above still do not result in a resolution, please
- OS:
- Node.js version:
- npm version:
- `` version:
- `@google-cloud/bigquery-migration` version:

#### Steps to reproduce

Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a [bug/issue](https://github.com//issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/nodejs-bigquery-migration/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)
Expand Down
4 changes: 2 additions & 2 deletions .github/generated-files-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ generatedFiles:
- path: '.github/generated-files-bot.+(yml|yaml)'
message: '`.github/generated-files-bot.(yml|yaml)` should be updated in [`synthtool`](https://github.com/googleapis/synthtool)'
- path: 'README.md'
message: '`README.md` is managed by [`synthtool`](https://github.com/googleapis/synthtool). However, a partials file can be used to update the README, e.g.: https://github.com/googleapis/nodejs-storage/blob/master/.readme-partials.yaml'
message: '`README.md` is managed by [`synthtool`](https://github.com/googleapis/synthtool). However, a partials file can be used to update the README, e.g.: https://github.com/googleapis/nodejs-storage/blob/main/.readme-partials.yaml'
- path: 'samples/README.md'
message: '`samples/README.md` is managed by [`synthtool`](https://github.com/googleapis/synthtool). However, a partials file can be used to update the README, e.g.: https://github.com/googleapis/nodejs-storage/blob/master/.readme-partials.yaml'
message: '`samples/README.md` is managed by [`synthtool`](https://github.com/googleapis/synthtool). However, a partials file can be used to update the README, e.g.: https://github.com/googleapis/nodejs-storage/blob/main/.readme-partials.yaml'
ignoreAuthors:
- 'gcf-owl-bot[bot]'
- 'yoshi-automation'
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
branches:
- master
- main
pull_request:
name: ci
jobs:
Expand Down
4 changes: 2 additions & 2 deletions .kokoro/common.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .kokoro/continuous/node12/common.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/continuous/node12/lint.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/continuous/node12/samples-test.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/continuous/node12/system-test.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .kokoro/presubmit/node12/common.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/presubmit/node12/samples-test.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .kokoro/presubmit/node12/system-test.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .kokoro/release/docs-devsite.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .kokoro/release/docs.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .kokoro/release/publish.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 13 additions & 14 deletions .repo-metadata.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{
"name": "migration--distribution-name&#x3D;@google-cloud/biguqery-migration",
"name_pretty": "",
"product_documentation": "",
"client_documentation": "",
"issue_tracker": "",
"release_level": "beta",
"language": "",
"repo": "",
"distribution_name": "",
"api_id": "migration--distribution-name&#x3D;@google-cloud/biguqery-migration.googleapis.com",
"default_version": "v2",
"requires_billing": true
}

"name": "bigquerymigration",
"name_pretty": "BigQuery Migration API",
"product_documentation": "https://cloud.google.com/bigquery/docs/migration-intro",
"client_documentation": "https://cloud.google.com/nodejs/docs/reference/bigquery-migration/latest",
"issue_tracker": "https://github.com/googleapis/nodejs-bigquery-migration/issues",
"release_level": "beta",
"language": "nodejs",
"repo": "googleapis/nodejs-bigquery-migration",
"distribution_name": "@google-cloud/bigquery-migration",
"api_id": "bigquerymigration.googleapis.com",
"default_version": "v2",
"requires_billing": true
}
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ accept your pull requests.

1. [Select or create a Cloud Platform project][projects].
1. [Enable billing for your project][billing].
1. [Enable the API][enable_api].
1. [Enable the BigQuery Migration API API][enable_api].
1. [Set up authentication with a service account][auth] so you can access the
API from your local workstation.

Expand Down Expand Up @@ -72,5 +72,5 @@ accept your pull requests.
[setup]: https://cloud.google.com/nodejs/docs/setup
[projects]: https://console.cloud.google.com/project
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=migration--distribution-name&#x3D;@google-cloud/biguqery-migration.googleapis.com
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=bigquerymigration.googleapis.com
[auth]: https://cloud.google.com/docs/authentication/getting-started
71 changes: 19 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
[//]: # "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"/>

# [: Client](https://github.com/)
# [BigQuery Migration API: Node.js Client](https://github.com/googleapis/nodejs-bigquery-migration)

[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
[![npm version](https://img.shields.io/npm/v/.svg)](https://www.npmjs.org/package/)
[![npm version](https://img.shields.io/npm/v/@google-cloud/bigquery-migration.svg)](https://www.npmjs.org/package/@google-cloud/bigquery-migration)




migration--distribution-name&#x3D;@google-cloud/biguqery-migration client for Node.js
bigquery-migration client for Node.js


A comprehensive list of changes in each version may be found in
[the CHANGELOG](https://github.com//blob/master/CHANGELOG.md).
[the CHANGELOG](https://github.com/googleapis/nodejs-bigquery-migration/blob/main/CHANGELOG.md).



* [github.com/](https://github.com/)
* [BigQuery Migration API Node.js Client API Reference][client-docs]
* [BigQuery Migration API Documentation][product-docs]
* [github.com/googleapis/nodejs-bigquery-migration](https://github.com/googleapis/nodejs-bigquery-migration)

Read more about the client libraries for Cloud APIs, including the older
Google APIs Client Libraries, in [Client Libraries Explained][explained].
Expand All @@ -31,8 +31,8 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
* [Quickstart](#quickstart)
* [Before you begin](#before-you-begin)
* [Installing the client library](#installing-the-client-library)
* [Using the client library](#using-the-client-library)
* [Samples](#samples)


* [Versioning](#versioning)
* [Contributing](#contributing)
* [License](#license)
Expand All @@ -43,55 +43,22 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].

1. [Select or create a Cloud Platform project][projects].
1. [Enable billing for your project][billing].
1. [Enable the API][enable_api].
1. [Enable the BigQuery Migration API API][enable_api].
1. [Set up authentication with a service account][auth] so you can access the
API from your local workstation.

### Installing the client library

```bash
npm install
```


### Using the client library

```
// Imports the Google Cloud client library
// remove this line after package is released
// eslint-disable-next-line node/no-missing-require
const {MigrationServiceClient} = require('');
// TODO(developer): replace with your prefered project ID.
// const projectId = 'my-project'
// Creates a client
// eslint-disable-next-line no-unused-vars
const client = new {MigrationServiceClient}();
//TODO(library generator): write the actual function you will be testing
async function doSomething() {
console.log('DPE! Change this code so that it shows how to use the library! See comments below on structure.')
// const [thing] = await client.methodName({
// });
// console.info(thing);
}
doSomething();
npm install @google-cloud/bigquery-migration
```



## Samples

Samples are in the [`samples/`](https://github.com//tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample.

| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
| Quickstart | [source code](https://github.com//blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |


The [BigQuery Migration API Node.js Client API Reference][client-docs] documentation
also contains samples.

## Supported Node.js Versions

Expand All @@ -111,7 +78,7 @@ best-efforts basis with the following warnings:
Client libraries targeting some end-of-life versions of Node.js are available, and
can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).
The dist-tags follow the naming convention `legacy-(version)`.
For example, `npm install @legacy-8` installs client libraries
For example, `npm install @google-cloud/bigquery-migration@legacy-8` installs client libraries
for versions compatible with Node.js 8.

## Versioning
Expand All @@ -136,7 +103,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages]

## Contributing

Contributions welcome! See the [Contributing Guide](https://github.com//blob/master/CONTRIBUTING.md).
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-bigquery-migration/blob/main/CONTRIBUTING.md).

Please note that this `README.md`, the `samples/README.md`,
and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)
Expand All @@ -148,12 +115,12 @@ to its templates in

Apache Version 2.0

See [LICENSE](https://github.com//blob/master/LICENSE)


See [LICENSE](https://github.com/googleapis/nodejs-bigquery-migration/blob/main/LICENSE)

[client-docs]: https://cloud.google.com/nodejs/docs/reference/bigquery-migration/latest
[product-docs]: https://cloud.google.com/bigquery/docs/migration-intro
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
[projects]: https://console.cloud.google.com/project
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=migration--distribution-name&#x3D;@google-cloud/biguqery-migration.googleapis.com
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=bigquerymigration.googleapis.com
[auth]: https://cloud.google.com/docs/authentication/getting-started
18 changes: 17 additions & 1 deletion linkinator.config.json
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
{"recurse":true,"skip":["https://codecov.io/gh/googleapis/","www.googleapis.com","img.shields.io"],"silent":true,"concurrency":5,"retry":true,"retryErrors":true,"retryErrorsCount":5,"retryErrorsJitter":3000}
{
"recurse": true,
"skip": [
"https://codecov.io/gh/googleapis/",
"www.googleapis.com",
"img.shields.io",
"https://cloud.google.com/nodejs/docs/reference/bigquery-migration/latest",
"https://github.com/googleapis/nodejs-bigquery-migration/blob/master/CHANGELOG.md",
"https://github.com/googleapis/nodejs-bigquery-migration/blob/addSamples/CHANGELOG.md"
],
"silent": true,
"concurrency": 5,
"retry": true,
"retryErrors": true,
"retryErrorsCount": 5,
"retryErrorsJitter": 3000
}
Loading

0 comments on commit 2068ba5

Please sign in to comment.