Struct gsbrs::GSBClient
[−]
[src]
pub struct GSBClient { // some fields omitted }
A client for interacting with the Google Safe Browsing Lookup API
Methods
impl GSBClient
fn new(key: String) -> GSBClient
Creates a new GSBClient that will use 'key' as the GSB API key
fn change_client_name(&mut self, client_name: String)
Sets the GSBClient client_name to 'client_name' GSBClient uses 'gsbrs' as the client_name by default.
fn lookup(&self, url: &Url) -> Result<Vec<Status>, GSBError>
Queries GSB API with 'url', returns Vec of Status for 'url'
fn lookup_all<'a, I>(&self, urls: I) -> Result<Vec<Vec<Status>>, GSBError> where I: Iterator<Item=&'a str>
Perform a bulk lookup on an iterable of urls. Returns a Vector of Vectors containing Statuses. Returns GSBError::TooManyUrls if > 500 urls are pased in