2.0.20220811 • Published 2 years ago

@maxim_mazurok/gapi.client.retail v2.0.20220811

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

TypeScript typings for Retail API v2

Cloud Retail service enables customers to build end-to-end personalized recommendation systems without requiring a high level of expertise in machine learning, recommendation system, or Google Cloud. For detailed description please check documentation.

Installing

Install typings for Retail API:

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

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',
    ],
    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 Retail API resources:

2.0.20220609

2 years ago

2.0.20220729

2 years ago

2.0.20220802

2 years ago

2.0.20220623

2 years ago

2.0.20220617

2 years ago

2.0.20220811

2 years ago

2.0.20220630

2 years ago

2.0.20220707

2 years ago

2.0.20220722

2 years ago

2.0.20220716

2 years ago

2.0.20220530

2 years ago

2.0.20220602

2 years ago

2.0.20220512

2 years ago

2.0.20220430

2 years ago

2.0.20220505

2 years ago

2.0.20220519

2 years ago

2.0.20220414

2 years ago

2.0.20220408

2 years ago

2.0.20220421

2 years ago

2.0.20220324

2 years ago

2.0.20220319

2 years ago

2.0.20220310

2 years ago

2.0.20220224

2 years ago

2.0.20220303

2 years ago

2.0.20220316

2 years ago

2.0.20220210

2 years ago

2.0.20220120

2 years ago

2.0.20220203

2 years ago

2.0.20220106

2 years ago

2.0.20220127

2 years ago

2.0.20220121

2 years ago

2.0.20220217

2 years ago

2.0.20211210

2 years ago

2.0.20211111

2 years ago

2.0.20211116

2 years ago

2.0.20211203

2 years ago

2.0.20211104

3 years ago

2.0.20211028

3 years ago

2.0.20211021

3 years ago

2.0.20211011

3 years ago

2.0.20211014

3 years ago

2.0.20210930

3 years ago

2.0.20210924

3 years ago

2.0.20210909

3 years ago

2.0.20210906

3 years ago

2.0.20210826

3 years ago

2.0.20210819

3 years ago

2.0.20210812

3 years ago

2.0.20210809

3 years ago

2.0.20210730

3 years ago

2.0.20210728

3 years ago

2.0.20210723

3 years ago

2.0.20210716

3 years ago

2.0.20210709

3 years ago

2.0.20210702

3 years ago

2.0.20210625

3 years ago

2.0.20210618

3 years ago

2.0.20210614

3 years ago

2.0.20210608

3 years ago

2.0.20210528

3 years ago

2.0.20210521

3 years ago

2.0.20210514

3 years ago

2.0.20210507

3 years ago

2.0.20210430

3 years ago

2.0.20210423

3 years ago

2.0.20210416

3 years ago