0.1.2 • Published 12 years ago
client-oauth v0.1.2
Node.js OAuth Client Library
Install via npm
npm install client-oauth
OAuth 1.0a
Usage
var example = new OAuth[1.0]({
base: 'http://term.ie/oauth/example',
key: 'key',
secret: 'secret'
})
Possible options:
{
// API endpoint base URL
base: '',
// Consumer token
key: '',
// Consumer secret
secret: '',
// OAuth signature method
signature_method: 'HMAC-SHA1',
// HTTP request headers
headers: {
'Accept': '*/*',
'Connection': 'Close',
'User-Agent': 'node.js/client-oauth'
}
}
var user = new example.Client()
user.get(
'/request_token.php', null,
function( error, data, response ) {
if( response && response.statusCode ) {
console.log( response.statusCode )
console.log( data )
} else {
console.log( error )
}
}
)