Last active
August 29, 2015 14:03
-
-
Save rektide/c2f35336baa6b1d80c5d to your computer and use it in GitHub Desktop.
Noun Project sample
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
var OAuth = require('oauth') | |
// `npm install oauth` to satisfy | |
// website: https://github.com/ciaranj/node-oauth | |
var KEY = "<INSERT KEY HERE>" | |
var SECRET = "<INSERT SECRET HERE>" | |
var oauth = new OAuth.OAuth( | |
'http://api.thenounproject.com', | |
'http://api.thenounproject.com', | |
KEY, | |
SECRET, | |
'1.0A', | |
null, | |
'HMAC-SHA1', | |
undefined, | |
{"Accept": "application/json"} | |
) | |
oauth.get( | |
'http://api.thenounproject.com/icon/6324', | |
KEY, | |
SECRET, | |
function (e, data, res){ | |
if (e) console.error(e) | |
console.log(require('util').inspect(data)) | |
} | |
) |
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
{ | |
"dependencies": { | |
"oauth": "^0.9.12" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment