0.0.20240502 • Published 2 days ago

@maxim_mazurok/gapi.client.recommendationengine-v1beta1 v0.0.20240502

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

TypeScript typings for Recommendations AI (Beta) v1beta1

Note that we now highly recommend new customers to use Retail API, which incorporates the GA version of the Recommendations AI funtionalities. To enable Retail API, please visit https://console.cloud.google.com/apis/library/retail.googleapis.com. The Recommendations AI 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 Recommendations AI (Beta):

npm install @types/gapi.client.recommendationengine-v1beta1 --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(
  'https://recommendationengine.googleapis.com/$discovery/rest?version=v1beta1',
  () => {
    // now we can use:
    // gapi.client.recommendationengine
  }
);
// Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
gapi.client.load('recommendationengine', 'v1beta1', () => {
  // now we can use:
  // gapi.client.recommendationengine
});

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 Recommendations AI (Beta) resources:

0.0.20240502

2 days ago

0.0.20240418

16 days ago

0.0.20240411

24 days ago

0.0.20240401

1 month ago

0.0.20240321

2 months ago

0.0.20240307

2 months ago

0.0.20240229

2 months ago

0.0.20240226

2 months ago

0.0.20240201

3 months ago

0.0.20240118

4 months ago

0.0.20240111

4 months ago

0.0.20240108

4 months ago

0.0.20231213

5 months ago

0.0.20231130

5 months ago

0.0.20230810

9 months ago

0.0.20230710

10 months ago

0.0.20231109

6 months ago

0.0.20230914

8 months ago

0.0.20230713

10 months ago

0.0.20231011

7 months ago

0.0.20231016

7 months ago

0.0.20230929

7 months ago

0.0.20230629

10 months ago

0.0.20230921

8 months ago

0.0.20230720

10 months ago

0.0.20231019

7 months ago

0.0.20230727

9 months ago

0.0.20231102

6 months ago

0.0.20231005

7 months ago

0.0.20231026

6 months ago

0.0.20230622

11 months ago

0.0.20230515

12 months ago

0.0.20230608

11 months ago

0.0.20230524

11 months ago

0.0.20230412

1 year ago

0.0.20230413

1 year ago

0.0.20230306

1 year ago

0.0.20230330

1 year ago

0.0.20230420

1 year ago

0.0.20230321

1 year ago

0.0.20230218

1 year ago

0.0.20221103

2 years ago

0.0.20230105

1 year ago

0.0.20230102

1 year ago

0.0.20221020

2 years ago

0.0.20221013

2 years ago

0.0.20220922

2 years ago

0.0.20220916

2 years ago

0.0.20220906

2 years ago

0.0.20220829

2 years ago

0.0.20220818

2 years ago

0.0.20220908

2 years ago

0.0.20220901

2 years ago

0.0.20220812

2 years ago

0.0.20220804

2 years ago