Skip to content

Instantly share code, notes, and snippets.

@osde8info
Created May 12, 2019 12:16
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 osde8info/caee283fe3c78b09d5542299bda4bfbd to your computer and use it in GitHub Desktop.
Save osde8info/caee283fe3c78b09d5542299bda4bfbd to your computer and use it in GitHub Desktop.
yahoo api node oauth example
// require('secrets');
var OAuth = require('oauth');
var request = new OAuth.OAuth(
null,
null,
MyKey,
MySecret,
'1.0',
null,
'HMAC-SHA1',
null,
{
"X-Yahoo-App-Id": MyAppid
}
);
request.get(
'https://weather-ydn-yql.media.yahoo.com/forecastrss?location=brighton,uk&format=json',
null,
null,
function (err, data, result) {
if (err) {
console.log(err);
} else {
console.log(data)
}
}
);
@osde8info
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment