Skip to content

Instantly share code, notes, and snippets.

@tahmmee
Last active August 29, 2015 14:21
Show Gist options
  • Save tahmmee/fe8fa95d24f9ba14c7ec to your computer and use it in GitHub Desktop.
Save tahmmee/fe8fa95d24f9ba14c7ec to your computer and use it in GitHub Desktop.
// NODE_AUTH https://github.com/ciaranj/node-oauth
var body = { "user_id": 5456680,
"first_name": "Tommie",
"last_name": "McAfee",
"email": "contact@phikay.com",
"address1": "2384 Beal",
"city": "Omahah",
"state": "NE",
"country_code": "US",
"zipcode": "47544",
"phone": "555-555-1234",
"dob": "1971-05-09",
"gender": "M",
"events": [
{ "event_id": 42801,
"giveaway_option_id": 272454 } ]
} ],
"waiver_accepted": "T"
}
var oauth = new OAuth.OAuth(
'https://runsignup.com/oauth/requestToken.php',
'https://runsignup.com/oauth/accessToken.php',
oauth_key,
oauth_secret,
'1.0A',
null,
'HMAC-SHA1'
);
oauth.post(
"https://runsignup.com/Rest/race/15728/registration?action=get-cart&format=json",
api_key, api_secret,
{"request_format": "json", "request": JSON.stringify(body)},
function(error, data) {
if(error){/* handle */ }
done()
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment