1.0.20220808 • Published 2 years ago

@maxim_mazurok/gapi.client.firestore v1.0.20220808

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

TypeScript typings for Cloud Firestore API v1

Accesses the NoSQL document database built for automatic scaling, high performance, and ease of application development. For detailed description please check documentation.

Installing

Install typings for Cloud Firestore API:

npm install @types/gapi.client.firestore@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('firestore', 'v1', () => {
  // now we can use gapi.client.firestore
  // ...
});

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 = [ 
      // 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 and manage your Google Cloud Datastore data
      'https://www.googleapis.com/auth/datastore',
    ],
    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 Cloud Firestore API resources:

1.0.20220715

2 years ago

1.0.20220625

2 years ago

1.0.20220609

2 years ago

1.0.20220808

2 years ago

1.0.20220730

2 years ago

1.0.20220604

2 years ago

1.0.20220428

2 years ago

1.0.20220524

2 years ago

1.0.20220511

2 years ago

1.0.20220319

2 years ago

1.0.20220324

2 years ago

1.0.20220402

2 years ago

1.0.20220407

2 years ago

1.0.20220221

2 years ago

1.0.20220305

2 years ago

1.0.20220119

2 years ago

1.0.20220104

2 years ago

1.0.20220207

2 years ago

1.0.20220110

2 years ago

1.0.20211110

3 years ago

1.0.20211029

3 years ago

1.0.20211206

2 years ago

1.0.20211129

2 years ago

1.0.20211025

3 years ago

1.0.20211013

3 years ago

1.0.20210927

3 years ago

1.0.20210916

3 years ago

1.0.20210901

3 years ago

1.0.20210816

3 years ago

1.0.20210805

3 years ago

1.0.20210719

3 years ago

1.0.20210615

3 years ago

1.0.20210607

3 years ago

1.0.20210518

3 years ago

1.0.20210506

3 years ago

1.0.20210426

3 years ago

1.0.20210419

3 years ago

1.0.20210326

3 years ago

1.0.20210317

3 years ago

1.0.20210220

3 years ago

1.0.20201003

3 years ago

1.0.20201103

4 years ago