3.0.20220726 • Published 3 years ago

@maxim_mazurok/gapi.client.indexing v3.0.20220726

Weekly downloads
52
License
MIT
Repository
github
Last release
3 years ago

TypeScript typings for Indexing API v3

Notifies Google when your web pages change. For detailed description please check documentation.

Installing

Install typings for Indexing API:

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

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 = [ 
      // Submit data to Google for indexing
      'https://www.googleapis.com/auth/indexing',
    ],
    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 Indexing API resources:

/*
Gets metadata about a Web Document. This method can _only_ be used to query URLs that were previously seen in successful Indexing API notifications. Includes the latest `UrlNotification` received via this API.
*/
await gapi.client.indexing.urlNotifications.getMetadata({  });

/*
Notifies that a URL has been updated or deleted.
*/
await gapi.client.indexing.urlNotifications.publish({  });
3.0.20220726

3 years ago

3.0.20220609

3 years ago

3.0.20220628

3 years ago

3.0.20220706

3 years ago

3.0.20220712

3 years ago

3.0.20220623

3 years ago

3.0.20220621

3 years ago

3.0.20220517

3 years ago

3.0.20220602

3 years ago

3.0.20220509

3 years ago

3.0.20220405

3 years ago

3.0.20220412

3 years ago

3.0.20220322

3 years ago

3.0.20220315

3 years ago

3.0.20220419

3 years ago

3.0.20220126

3 years ago

3.0.20220309

3 years ago

3.0.20220301

3 years ago

3.0.20211228

4 years ago

3.0.20220125

3 years ago

3.0.20220111

3 years ago

3.0.20220104

3 years ago

3.0.20211103

4 years ago

3.0.20211109

4 years ago

3.0.20211130

4 years ago

3.0.20211123

4 years ago

3.0.20211101

4 years ago

3.0.20211019

4 years ago

3.0.20211002

4 years ago

3.0.20211007

4 years ago

3.0.20211012

4 years ago

3.0.20210921

4 years ago

3.0.20210914

4 years ago

3.0.20210907

4 years ago

3.0.20210831

4 years ago

3.0.20210824

4 years ago

3.0.20210817

4 years ago

3.0.20210727

4 years ago

3.0.20210720

4 years ago

3.0.20210713

4 years ago

3.0.20210709

4 years ago

3.0.20210624

4 years ago

3.0.20210608

4 years ago

3.0.20210623

4 years ago

3.0.20210601

4 years ago

3.0.20210526

4 years ago

3.0.20210521

4 years ago

3.0.20210517

4 years ago

3.0.20210507

4 years ago

3.0.20210427

4 years ago

3.0.20210420

4 years ago

3.0.20210414

4 years ago

3.0.20210412

4 years ago

3.0.20210401

4 years ago

3.0.20210323

4 years ago

3.0.20210315

4 years ago

3.0.20210313

4 years ago

3.0.20210302

4 years ago

3.0.20210216

4 years ago

3.0.20210202

4 years ago

3.0.20210126

4 years ago

3.0.20210119

4 years ago

3.0.20210112

4 years ago

3.0.20210107

4 years ago

3.0.20201229

4 years ago

3.0.20201209

5 years ago

3.0.20201204

5 years ago

3.0.20201117

5 years ago

3.0.20201110

5 years ago

3.0.20201103

5 years ago