Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Renamed user method to getUser

  • Loading branch information...
commit 4b0134bc90aab865390c8d58dfbf34b13f493f52 1 parent ca2c1ba
@andzdroid authored
Showing with 6 additions and 6 deletions.
  1. +5 −5 lib/posterous.js
  2. +1 −1  tests/user.js
View
10 lib/posterous.js
@@ -10,10 +10,6 @@ var Posterous = function(user, pass) {
this._token = null;
};
-Posterous.prototype.setToken = function(token) {
- this._token = token;
-};
-
Posterous.prototype.request = function(method, api, args, callback) {
args = args || {};
@@ -92,7 +88,7 @@ Posterous.prototype.auth = function getAuthKey(callback) {
//Users
-Posterous.prototype.user = function getCurrentUser(callback) {
+Posterous.prototype.getUser = function getCurrentUser(callback) {
this.request('GET', 'users/me', null, function(err, result) {
if (err) {
return callback(err);
@@ -102,4 +98,8 @@ Posterous.prototype.user = function getCurrentUser(callback) {
});
};
+
+//Subscriptions
+
+
module.exports = Posterous;
View
2  tests/user.js
@@ -10,7 +10,7 @@ module.exports['Current User'] = function(test) {
return test.done();
}
- posterous.user(function(err, result) {
+ posterous.getUser(function(err, result) {
test.ok(!err, 'An error occurred: ' + err);
test.ok(result, 'Did not retrieve user information');
Please sign in to comment.
Something went wrong with that request. Please try again.