Skip to content

Instantly share code, notes, and snippets.

@mfowlewebs
Created July 8, 2014 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfowlewebs/bab13be04c7868262891 to your computer and use it in GitHub Desktop.
Save mfowlewebs/bab13be04c7868262891 to your computer and use it in GitHub Desktop.
Noun Project Demo
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))
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment