Skip to content
Browse files

Update timeline resources

Add getRetweetedToUser() and getRetweetedByUser(), deprecated
getPublicTimeline() and getFriendsTimeline()
  • Loading branch information...
1 parent 806a2d8 commit 5fa1af0d15f0d3499f7a4c3d6109f55e97a5b0d0 @jdub committed Mar 11, 2012
Showing with 30 additions and 16 deletions.
  1. +30 −16 lib/twitter.js
View
46 lib/twitter.js
@@ -392,50 +392,50 @@ Twitter.prototype.gatekeeper = function(failure) {
// Timeline resources
-Twitter.prototype.getPublicTimeline = function(params, callback) {
- var url = '/statuses/public_timeline.json';
+Twitter.prototype.getHomeTimeline = function(params, callback) {
+ var url = '/statuses/home_timeline.json';
this.get(url, params, callback);
return this;
}
-Twitter.prototype.getHomeTimeline = function(params, callback) {
- var url = '/statuses/home_timeline.json';
+Twitter.prototype.getMentions = function(params, callback) {
+ var url = '/statuses/mentions.json';
this.get(url, params, callback);
return this;
}
-Twitter.prototype.getFriendsTimeline = function(params, callback) {
- var url = '/statuses/friends_timeline.json';
+Twitter.prototype.getRetweetedByMe = function(params, callback) {
+ var url = '/statuses/retweeted_by_me.json';
this.get(url, params, callback);
return this;
}
-Twitter.prototype.getUserTimeline = function(params, callback) {
- var url = '/statuses/user_timeline.json';
+Twitter.prototype.getRetweetedToMe = function(params, callback) {
+ var url = '/statuses/retweeted_to_me.json';
this.get(url, params, callback);
return this;
}
-Twitter.prototype.getMentions = function(params, callback) {
- var url = '/statuses/mentions.json';
+Twitter.prototype.getRetweetsOfMe = function(params, callback) {
+ var url = '/statuses/retweets_of_me.json';
this.get(url, params, callback);
return this;
}
-Twitter.prototype.getRetweetedByMe = function(params, callback) {
- var url = '/statuses/retweeted_by_me.json';
+Twitter.prototype.getUserTimeline = function(params, callback) {
+ var url = '/statuses/user_timeline.json';
this.get(url, params, callback);
return this;
}
-Twitter.prototype.getRetweetedToMe = function(params, callback) {
- var url = '/statuses/retweeted_to_me.json';
+Twitter.prototype.getRetweetedToUser = function(params, callback) {
+ var url = '/statuses/retweeted_to_user.json';
this.get(url, params, callback);
return this;
}
-Twitter.prototype.getRetweetsOfMe = function(params, callback) {
- var url = '/statuses/retweets_of_me.json';
+Twitter.prototype.getRetweetedByUser = function(params, callback) {
+ var url = '/statuses/retweeted_by_user.json';
this.get(url, params, callback);
return this;
}
@@ -1099,6 +1099,20 @@ Twitter.prototype.geoGetPlace = function(place_id, callback) {
// Search resources
+// Deprecated resources
+
+Twitter.prototype.getPublicTimeline = function(params, callback) {
+ var url = '/statuses/public_timeline.json';
+ this.get(url, params, callback);
+ return this;
+}
+
+Twitter.prototype.getFriendsTimeline = function(params, callback) {
+ var url = '/statuses/friends_timeline.json';
+ this.get(url, params, callback);
+ return this;
+}
+
/*
* INTERNAL UTILITY FUNCTIONS

0 comments on commit 5fa1af0

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