Created
October 28, 2014 22:44
-
-
Save mrajagopal/1597c6db88200cf05e42 to your computer and use it in GitHub Desktop.
Node.js script utilizing Google's safe-browse API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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