0.0.20241027 • Published 9 months ago

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

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months 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.20241027

9 months ago

0.0.20241020

9 months ago

0.0.20241013

9 months ago

0.0.20240929

9 months ago

0.0.20241006

9 months ago

0.0.20240908

10 months ago

0.0.20240922

10 months ago

0.0.20240728

12 months ago

0.0.20240609

1 year ago

0.0.20240602

1 year ago

0.0.20240721

12 months ago

0.0.20240616

1 year ago

0.0.20240630

1 year ago

0.0.20240623

1 year ago

0.0.20240519

1 year ago

0.0.20240804

11 months ago

0.0.20240818

11 months ago

0.0.20240811

11 months ago

0.0.20240707

1 year ago

0.0.20240825

11 months ago

0.0.20240713

12 months ago

0.0.20240512

1 year ago

0.0.20240505

1 year ago

0.0.20240428

1 year ago

0.0.20240421

1 year ago

0.0.20240414

1 year ago

0.0.20240331

1 year ago

0.0.20240324

1 year ago

0.0.20240317

1 year ago

0.0.20240303

1 year ago

0.0.20240225

1 year ago

0.0.20240211

1 year ago

0.0.20240204

1 year ago

0.0.20240128

1 year ago

0.0.20240121

1 year ago

0.0.20240107

1 year ago

0.0.20231210

2 years ago

0.0.20231029

2 years ago

0.0.20231105

2 years ago

0.0.20230813

2 years ago

0.0.20231112

2 years ago

0.0.20230729

2 years ago

0.0.20230809

2 years ago

0.0.20230723

2 years ago

0.0.20230923

2 years ago

0.0.20231022

2 years ago

0.0.20230917

2 years ago

0.0.20230910

2 years ago

0.0.20231008

2 years ago

0.0.20230716

2 years ago

0.0.20231015

2 years ago

0.0.20230708

2 years ago

0.0.20230820

2 years ago

0.0.20230704

2 years ago

0.0.20231001

2 years ago

0.0.20230619

2 years ago

0.0.20230611

2 years ago

0.0.20230603

2 years ago

0.0.20230514

2 years ago

0.0.20230521

2 years ago

0.0.20230429

2 years ago

0.0.20230507

2 years ago

0.0.20230416

2 years ago

0.0.20230409

2 years ago

0.0.20230326

2 years ago

0.0.20230402

2 years ago

0.0.20230319

2 years ago

0.0.20230304

2 years ago

0.0.20230226

2 years ago

0.0.20230312

2 years ago

0.0.20230216

2 years ago

0.0.20230206

2 years ago

0.0.20230129

2 years ago

0.0.20230212

2 years ago

0.0.20221130

3 years ago

0.0.20221112

3 years ago

0.0.20221210

3 years ago

0.0.20230121

2 years ago

0.0.20221207

3 years ago

0.0.20221106

3 years ago

0.0.20221204

3 years ago

0.0.20230108

3 years ago

0.0.20221016

3 years ago

0.0.20221029

3 years ago

0.0.20221004

3 years ago

0.0.20221023

3 years ago

0.0.20220928

3 years ago

0.0.20220916

3 years ago

0.0.20220919

3 years ago

0.0.20220831

3 years ago

0.0.20220910

3 years ago

0.0.20220912

3 years ago

0.0.20220913

3 years ago

0.0.20220914

3 years ago

0.0.20220915

3 years ago

0.0.20220830

3 years ago

0.0.20220906

3 years ago

0.0.20220829

3 years ago

0.0.20220907

3 years ago

0.0.20220908

3 years ago

0.0.20220920

3 years ago

0.0.20220821

3 years ago

0.0.20220921

3 years ago

0.0.20220822

3 years ago

0.0.20220922

3 years ago

0.0.20220823

3 years ago

0.0.20220901

3 years ago

0.0.20220824

3 years ago

0.0.20220825

3 years ago

0.0.20220826

3 years ago

0.0.20220926

3 years ago

0.0.20220904

3 years ago

0.0.20220818

3 years ago

0.0.20220817

3 years ago

0.0.20220816

3 years ago

0.0.20220812

3 years ago

0.0.20220811

3 years ago