Skip to content

Instantly share code, notes, and snippets.

@mrajagopal
Created October 28, 2014 22:44
Show Gist options
  • Save mrajagopal/1597c6db88200cf05e42 to your computer and use it in GitHub Desktop.
Save mrajagopal/1597c6db88200cf05e42 to your computer and use it in GitHub Desktop.
Node.js script utilizing Google's safe-browse API
"use strict";
safeBrowse = require('safe-browse');
var safeBrowseApi = new safeBrowse.Api(AIzaSyA0do0yx2CP786Ex31THcjNRkuuIdtL5wg, options);
safeBrowseApi.lookup('http://twitter.com')
.on('success', function (data) {
})
.on( 'error', function ( error ) {
// handle error
console.log("lookup error " + error.statusCode);
console.log("lookup error " + error.message);
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment