3.0.20220726 • Published 2 years ago

@maxim_mazurok/gapi.client.indexing v3.0.20220726

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

2 years ago

3.0.20220609

2 years ago

3.0.20220628

2 years ago

3.0.20220706

2 years ago

3.0.20220712

2 years ago

3.0.20220623

2 years ago

3.0.20220621

2 years ago

3.0.20220517

2 years ago

3.0.20220602

2 years ago

3.0.20220509

2 years ago

3.0.20220405

2 years ago

3.0.20220412

2 years ago

3.0.20220322

2 years ago

3.0.20220315

2 years ago

3.0.20220419

2 years ago

3.0.20220126

2 years ago

3.0.20220309

2 years ago

3.0.20220301

2 years ago

3.0.20211228

2 years ago

3.0.20220125

2 years ago

3.0.20220111

2 years ago

3.0.20220104

2 years ago

3.0.20211103

3 years ago

3.0.20211109

3 years ago

3.0.20211130

2 years ago

3.0.20211123

2 years ago

3.0.20211101

3 years ago

3.0.20211019

3 years ago

3.0.20211002

3 years ago

3.0.20211007

3 years ago

3.0.20211012

3 years ago

3.0.20210921

3 years ago

3.0.20210914

3 years ago

3.0.20210907

3 years ago

3.0.20210831

3 years ago

3.0.20210824

3 years ago

3.0.20210817

3 years ago

3.0.20210727

3 years ago

3.0.20210720

3 years ago

3.0.20210713

3 years ago

3.0.20210709

3 years ago

3.0.20210624

3 years ago

3.0.20210608

3 years ago

3.0.20210623

3 years ago

3.0.20210601

3 years ago

3.0.20210526

3 years ago

3.0.20210521

3 years ago

3.0.20210517

3 years ago

3.0.20210507

3 years ago

3.0.20210427

3 years ago

3.0.20210420

3 years ago

3.0.20210414

3 years ago

3.0.20210412

3 years ago

3.0.20210401

3 years ago

3.0.20210323

3 years ago

3.0.20210315

3 years ago

3.0.20210313

3 years ago

3.0.20210302

3 years ago

3.0.20210216

3 years ago

3.0.20210202

3 years ago

3.0.20210126

3 years ago

3.0.20210119

3 years ago

3.0.20210112

3 years ago

3.0.20210107

3 years ago

3.0.20201229

3 years ago

3.0.20201209

3 years ago

3.0.20201204

3 years ago

3.0.20201117

3 years ago

3.0.20201110

4 years ago

3.0.20201103

4 years ago