1.0.20220807 • Published 3 years ago

@maxim_mazurok/gapi.client.bigquerydatatransfer v1.0.20220807

Weekly downloads
81
License
MIT
Repository
github
Last release
3 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

3 years ago

1.0.20220626

3 years ago

1.0.20220701

3 years ago

1.0.20220709

3 years ago

1.0.20220716

3 years ago

1.0.20220723

3 years ago

1.0.20220807

3 years ago

1.0.20220611

3 years ago

1.0.20220730

3 years ago

1.0.20220510

3 years ago

1.0.20220513

3 years ago

1.0.20220602

3 years ago

1.0.20220420

3 years ago

1.0.20220319

3 years ago

1.0.20220409

3 years ago

1.0.20220407

3 years ago

1.0.20220225

3 years ago

1.0.20220305

3 years ago

1.0.20211230

3 years ago

1.0.20220221

3 years ago

1.0.20220108

3 years ago

1.0.20220116

3 years ago

1.0.20220204

3 years ago

1.0.20220127

3 years ago

1.0.20220122

3 years ago

1.0.20211106

4 years ago

1.0.20211125

4 years ago

1.0.20211022

4 years ago

1.0.20211029

4 years ago

1.0.20211015

4 years ago

1.0.20210924

4 years ago

1.0.20210918

4 years ago

1.0.20210910

4 years ago

1.0.20210903

4 years ago

1.0.20210827

4 years ago

1.0.20210822

4 years ago

1.0.20210814

4 years ago

1.0.20210805

4 years ago

1.0.20210731

4 years ago

1.0.20210724

4 years ago

1.0.20210717

4 years ago

1.0.20210622

4 years ago

1.0.20210617

4 years ago

1.0.20210611

4 years ago

1.0.20210604

4 years ago

1.0.20210528

4 years ago

1.0.20210519

4 years ago

1.0.20210422

4 years ago

1.0.20210418

4 years ago

1.0.20210407

4 years ago

1.0.20210404

4 years ago

1.0.20210327

4 years ago

1.0.20210324

4 years ago

1.0.20210311

4 years ago

1.0.20210306

4 years ago

1.0.20210226

4 years ago

1.0.20210221

4 years ago

1.0.20210206

4 years ago

1.0.20210130

4 years ago

1.0.20210124

4 years ago

1.0.20210113

4 years ago

1.0.20201230

4 years ago

1.0.20201214

5 years ago

1.0.20201205

5 years ago

1.0.20201201

5 years ago

1.0.20201114

5 years ago

1.0.20201104

5 years ago