0.0.20240505 • Published 3 days ago

@maxim_mazurok/gapi.client.safebrowsing-v4 v0.0.20240505

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

TypeScript typings for Safe Browsing API v4

Enables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources. The Safe Browsing APIs are for non-commercial use only. If you need to use APIs to detect malicious URLs for commercial purposes – meaning “for sale or revenue-generating purposes” – please refer to the Web Risk API. For detailed description please check documentation.

Installing

Install typings for Safe Browsing API:

npm install @types/gapi.client.safebrowsing-v4 --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://safebrowsing.googleapis.com/$discovery/rest?version=v4',
  () => {
    // now we can use:
    // gapi.client.safebrowsing
  }
);
// 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('safebrowsing', 'v4', () => {
  // now we can use:
  // gapi.client.safebrowsing
});

After that you can use Safe Browsing API resources:

/*

*/
await gapi.client.safebrowsing.encodedFullHashes.get({
  encodedRequest: 'encodedRequest',
});

/*

*/
await gapi.client.safebrowsing.encodedUpdates.get({
  encodedRequest: 'encodedRequest',
});

/*
Finds the full hashes that match the requested hash prefixes.
*/
await gapi.client.safebrowsing.fullHashes.find({});

/*
Reports a Safe Browsing threat list hit to Google. Only projects with TRUSTED_REPORTER visibility can use this method.
*/
await gapi.client.safebrowsing.threatHits.create({});

/*
Lists the Safe Browsing threat lists available for download.
*/
await gapi.client.safebrowsing.threatLists.list({});

/*
Fetches the most recent threat list updates. A client can request updates for multiple lists at once.
*/
await gapi.client.safebrowsing.threatListUpdates.fetch({});

/*
Finds the threat entries that match the Safe Browsing lists.
*/
await gapi.client.safebrowsing.threatMatches.find({});
0.0.20240505

3 days ago

0.0.20240428

9 days ago

0.0.20240421

16 days ago

0.0.20240414

24 days ago

0.0.20240331

1 month ago

0.0.20240324

1 month ago

0.0.20240317

2 months ago

0.0.20240303

2 months ago

0.0.20240225

2 months ago

0.0.20240211

3 months ago

0.0.20240204

3 months ago

0.0.20240128

3 months ago

0.0.20240121

4 months ago

0.0.20240107

4 months ago

0.0.20231210

5 months ago

0.0.20231029

6 months ago

0.0.20231105

6 months ago

0.0.20230813

9 months ago

0.0.20231112

6 months ago

0.0.20230729

9 months ago

0.0.20230809

9 months ago

0.0.20230723

10 months ago

0.0.20230923

8 months ago

0.0.20231022

7 months ago

0.0.20230917

8 months ago

0.0.20230910

8 months ago

0.0.20231008

7 months ago

0.0.20230716

10 months ago

0.0.20231015

7 months ago

0.0.20230708

10 months ago

0.0.20230820

9 months ago

0.0.20230704

10 months ago

0.0.20231001

7 months ago

0.0.20230619

11 months ago

0.0.20230611

11 months ago

0.0.20230603

11 months ago

0.0.20230514

12 months ago

0.0.20230521

12 months ago

0.0.20230429

1 year ago

0.0.20230507

1 year ago

0.0.20230416

1 year ago

0.0.20230409

1 year ago

0.0.20230326

1 year ago

0.0.20230402

1 year ago

0.0.20230319

1 year ago

0.0.20230304

1 year ago

0.0.20230226

1 year ago

0.0.20230312

1 year ago

0.0.20230216

1 year ago

0.0.20230206

1 year ago

0.0.20230129

1 year ago

0.0.20230212

1 year ago

0.0.20221130

1 year ago

0.0.20221112

1 year ago

0.0.20221210

1 year ago

0.0.20230121

1 year ago

0.0.20221207

1 year ago

0.0.20221106

2 years ago

0.0.20221204

1 year ago

0.0.20230108

1 year ago

0.0.20221016

2 years ago

0.0.20221029

2 years ago

0.0.20221004

2 years ago

0.0.20221023

2 years ago

0.0.20220928

2 years ago

0.0.20220916

2 years ago

0.0.20220919

2 years ago

0.0.20220831

2 years ago

0.0.20220910

2 years ago

0.0.20220912

2 years ago

0.0.20220913

2 years ago

0.0.20220914

2 years ago

0.0.20220915

2 years ago

0.0.20220830

2 years ago

0.0.20220906

2 years ago

0.0.20220829

2 years ago

0.0.20220907

2 years ago

0.0.20220908

2 years ago

0.0.20220920

2 years ago

0.0.20220821

2 years ago

0.0.20220921

2 years ago

0.0.20220822

2 years ago

0.0.20220922

2 years ago

0.0.20220823

2 years ago

0.0.20220901

2 years ago

0.0.20220824

2 years ago

0.0.20220825

2 years ago

0.0.20220826

2 years ago

0.0.20220926

2 years ago

0.0.20220904

2 years ago

0.0.20220818

2 years ago

0.0.20220817

2 years ago

0.0.20220816

2 years ago

0.0.20220812

2 years ago

0.0.20220811

2 years ago