1.0.20220807 • Published 2 years ago

@maxim_mazurok/gapi.client.bigquerydatatransfer v1.0.20220807

Weekly downloads
81
License
MIT
Repository
github
Last release
2 years ago

TypeScript typings for BigQuery Data Transfer API v1

Schedule queries or transfer external data from SaaS applications to Google BigQuery on a regular basis. For detailed description please check documentation.

Installing

Install typings for BigQuery Data Transfer API:

npm install @types/gapi.client.bigquerydatatransfer@v1 --save-dev

Usage

You need to initialize Google API client in your code:

gapi.load('client', () => {
  // now we can use gapi.client
  // ...
});

Then load api client wrapper:

gapi.client.load('bigquerydatatransfer', 'v1', () => {
  // now we can use gapi.client.bigquerydatatransfer
  // ...
});

Don't forget to authenticate your client before sending any request to resources:

// declare client_id registered in Google Developers Console
var client_id = '',
  scope = [ 
      // View and manage your data in Google BigQuery and see the email address for your Google Account
      'https://www.googleapis.com/auth/bigquery',

      // See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
      'https://www.googleapis.com/auth/cloud-platform',

      // View your data across Google Cloud services and see the email address of your Google Account
      'https://www.googleapis.com/auth/cloud-platform.read-only',
    ],
    immediate = true;
// ...

gapi.auth.authorize(
  { client_id: client_id, scope: scope, immediate: immediate },
  authResult => {
    if (authResult && !authResult.error) {
        /* handle successful authorization */
    } else {
        /* handle authorization error */
    }
});

After that you can use BigQuery Data Transfer API resources:

/*
Enroll data sources in a user project. This allows users to create transfer configurations for these data sources. They will also appear in the ListDataSources RPC and as such, will appear in the [BigQuery UI](https://console.cloud.google.com/bigquery), and the documents can be found in the public guide for [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and [Data Transfer Service](https://cloud.google.com/bigquery/docs/working-with-transfers).
*/
await gapi.client.bigquerydatatransfer.projects.enrollDataSources({ name: "name",  });
1.0.20220615

2 years ago

1.0.20220626

2 years ago

1.0.20220701

2 years ago

1.0.20220709

2 years ago

1.0.20220716

2 years ago

1.0.20220723

2 years ago

1.0.20220807

2 years ago

1.0.20220611

2 years ago

1.0.20220730

2 years ago

1.0.20220510

2 years ago

1.0.20220513

2 years ago

1.0.20220602

2 years ago

1.0.20220420

2 years ago

1.0.20220319

2 years ago

1.0.20220409

2 years ago

1.0.20220407

2 years ago

1.0.20220225

2 years ago

1.0.20220305

2 years ago

1.0.20211230

2 years ago

1.0.20220221

2 years ago

1.0.20220108

2 years ago

1.0.20220116

2 years ago

1.0.20220204

2 years ago

1.0.20220127

2 years ago

1.0.20220122

2 years ago

1.0.20211106

3 years ago

1.0.20211125

2 years ago

1.0.20211022

3 years ago

1.0.20211029

3 years ago

1.0.20211015

3 years ago

1.0.20210924

3 years ago

1.0.20210918

3 years ago

1.0.20210910

3 years ago

1.0.20210903

3 years ago

1.0.20210827

3 years ago

1.0.20210822

3 years ago

1.0.20210814

3 years ago

1.0.20210805

3 years ago

1.0.20210731

3 years ago

1.0.20210724

3 years ago

1.0.20210717

3 years ago

1.0.20210622

3 years ago

1.0.20210617

3 years ago

1.0.20210611

3 years ago

1.0.20210604

3 years ago

1.0.20210528

3 years ago

1.0.20210519

3 years ago

1.0.20210422

3 years ago

1.0.20210418

3 years ago

1.0.20210407

3 years ago

1.0.20210404

3 years ago

1.0.20210327

3 years ago

1.0.20210324

3 years ago

1.0.20210311

3 years ago

1.0.20210306

3 years ago

1.0.20210226

3 years ago

1.0.20210221

3 years ago

1.0.20210206

3 years ago

1.0.20210130

3 years ago

1.0.20210124

3 years ago

1.0.20210113

3 years ago

1.0.20201230

3 years ago

1.0.20201214

3 years ago

1.0.20201205

3 years ago

1.0.20201201

3 years ago

1.0.20201114

4 years ago

1.0.20201104

4 years ago