Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update references sys -> util in examples to remove warnings in newer…

… versions of node
  • Loading branch information...
commit cc2813d30114a5946ef7d06b686d8859e6f4399d 1 parent 2007134
@raoulmillais raoulmillais authored
View
24 examples/term.ie.oauth-HMAC-SHA1.js
@@ -1,4 +1,4 @@
-var sys= require('sys')
+var util= require('util')
var OAuth= require('../lib/oauth').OAuth;
@@ -11,21 +11,21 @@ var oa= new OAuth("http://term.ie/oauth/example/request_token.php",
"HMAC-SHA1")
oa.getOAuthRequestToken(function(error, oauth_token, oauth_token_secret, results){
- if(error) sys.puts('error :' + error)
+ if(error) util.puts('error :' + error)
else {
- sys.puts('oauth_token :' + oauth_token)
- sys.puts('oauth_token_secret :' + oauth_token_secret)
- sys.puts('requestoken results :' + sys.inspect(results))
- sys.puts("Requesting access token")
+ util.puts('oauth_token :' + oauth_token)
+ util.puts('oauth_token_secret :' + oauth_token_secret)
+ util.puts('requestoken results :' + util.inspect(results))
+ util.puts("Requesting access token")
oa.getOAuthAccessToken(oauth_token, oauth_token_secret, function(error, oauth_access_token, oauth_access_token_secret, results2) {
- sys.puts('oauth_access_token :' + oauth_access_token)
- sys.puts('oauth_token_secret :' + oauth_access_token_secret)
- sys.puts('accesstoken results :' + sys.inspect(results2))
- sys.puts("Requesting access token")
+ util.puts('oauth_access_token :' + oauth_access_token)
+ util.puts('oauth_token_secret :' + oauth_access_token_secret)
+ util.puts('accesstoken results :' + util.inspect(results2))
+ util.puts("Requesting access token")
var data= "";
oa.getProtectedResource("http://term.ie/oauth/example/echo_api.php?foo=bar&too=roo", "GET", oauth_access_token, oauth_access_token_secret, function (error, data, response) {
- sys.puts(data);
+ util.puts(data);
});
});
}
-})
+})
View
4 examples/term.ie.oauth-PLAINTEXT.js
@@ -1,4 +1,4 @@
-var sys= require('sys')
+var util= require('util')
var OAuth= require('../lib/oauth').OAuth;
@@ -31,4 +31,4 @@ oa.getOAuthRequestToken(function(error, oauth_token, oauth_token_secret, result
console.log(data);
});
});
-})
+})

0 comments on commit cc2813d

Please sign in to comment.
Something went wrong with that request. Please try again.