public class Safebrowsing
extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient
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 more information about this service, see the API Documentation
This service uses SafebrowsingRequestInitializer
to initialize global parameters via its
Safebrowsing.Builder
.
Modifier and Type | Class and Description |
---|---|
static class |
Safebrowsing.Builder
Builder for
Safebrowsing . |
class |
Safebrowsing.EncodedFullHashes
The "encodedFullHashes" collection of methods.
|
class |
Safebrowsing.EncodedUpdates
The "encodedUpdates" collection of methods.
|
class |
Safebrowsing.FullHashes
The "fullHashes" collection of methods.
|
class |
Safebrowsing.ThreatHits
The "threatHits" collection of methods.
|
class |
Safebrowsing.ThreatLists
The "threatLists" collection of methods.
|
class |
Safebrowsing.ThreatListUpdates
The "threatListUpdates" collection of methods.
|
class |
Safebrowsing.ThreatMatches
The "threatMatches" collection of methods.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_BASE_URL
The default encoded base URL of the service.
|
static java.lang.String |
DEFAULT_BATCH_PATH
The default encoded batch path of the service.
|
static java.lang.String |
DEFAULT_ROOT_URL
The default encoded root URL of the service.
|
static java.lang.String |
DEFAULT_SERVICE_PATH
The default encoded service path of the service.
|
Constructor and Description |
---|
Safebrowsing(com.google.api.client.http.HttpTransport transport,
com.google.api.client.json.JsonFactory jsonFactory,
com.google.api.client.http.HttpRequestInitializer httpRequestInitializer)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Safebrowsing.EncodedFullHashes |
encodedFullHashes()
An accessor for creating requests from the EncodedFullHashes collection.
|
Safebrowsing.EncodedUpdates |
encodedUpdates()
An accessor for creating requests from the EncodedUpdates collection.
|
Safebrowsing.FullHashes |
fullHashes()
An accessor for creating requests from the FullHashes collection.
|
protected void |
initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest<?> httpClientRequest) |
Safebrowsing.ThreatHits |
threatHits()
An accessor for creating requests from the ThreatHits collection.
|
Safebrowsing.ThreatLists |
threatLists()
An accessor for creating requests from the ThreatLists collection.
|
Safebrowsing.ThreatListUpdates |
threatListUpdates()
An accessor for creating requests from the ThreatListUpdates collection.
|
Safebrowsing.ThreatMatches |
threatMatches()
An accessor for creating requests from the ThreatMatches collection.
|
getJsonFactory, getObjectParser
public static final java.lang.String DEFAULT_ROOT_URL
public static final java.lang.String DEFAULT_SERVICE_PATH
public static final java.lang.String DEFAULT_BATCH_PATH
public static final java.lang.String DEFAULT_BASE_URL
public Safebrowsing(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, com.google.api.client.http.HttpRequestInitializer httpRequestInitializer)
Use Safebrowsing.Builder
if you need to specify any of the optional parameters.
transport
- HTTP transport, which should normally be:
com.google.api.client.extensions.appengine.http.UrlFetchTransport
newCompatibleTransport
from
com.google.api.client.extensions.android.http.AndroidHttp
com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()
jsonFactory
- JSON factory, which may be:
com.google.api.client.json.jackson2.JacksonFactory
com.google.api.client.json.gson.GsonFactory
com.google.api.client.extensions.android.json.AndroidJsonFactory
httpRequestInitializer
- HTTP request initializer or null
for noneprotected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest<?> httpClientRequest) throws java.io.IOException
initialize
in class com.google.api.client.googleapis.services.AbstractGoogleClient
java.io.IOException
public Safebrowsing.EncodedFullHashes encodedFullHashes()
The typical use is:
Safebrowsing safebrowsing = new Safebrowsing(...);
Safebrowsing.EncodedFullHashes.List request = safebrowsing.encodedFullHashes().list(parameters ...)
public Safebrowsing.EncodedUpdates encodedUpdates()
The typical use is:
Safebrowsing safebrowsing = new Safebrowsing(...);
Safebrowsing.EncodedUpdates.List request = safebrowsing.encodedUpdates().list(parameters ...)
public Safebrowsing.FullHashes fullHashes()
The typical use is:
Safebrowsing safebrowsing = new Safebrowsing(...);
Safebrowsing.FullHashes.List request = safebrowsing.fullHashes().list(parameters ...)
public Safebrowsing.ThreatHits threatHits()
The typical use is:
Safebrowsing safebrowsing = new Safebrowsing(...);
Safebrowsing.ThreatHits.List request = safebrowsing.threatHits().list(parameters ...)
public Safebrowsing.ThreatListUpdates threatListUpdates()
The typical use is:
Safebrowsing safebrowsing = new Safebrowsing(...);
Safebrowsing.ThreatListUpdates.List request = safebrowsing.threatListUpdates().list(parameters ...)
public Safebrowsing.ThreatLists threatLists()
The typical use is:
Safebrowsing safebrowsing = new Safebrowsing(...);
Safebrowsing.ThreatLists.List request = safebrowsing.threatLists().list(parameters ...)
public Safebrowsing.ThreatMatches threatMatches()
The typical use is:
Safebrowsing safebrowsing = new Safebrowsing(...);
Safebrowsing.ThreatMatches.List request = safebrowsing.threatMatches().list(parameters ...)