Skip to content
This repository has been archived by the owner on Aug 25, 2018. It is now read-only.

Commit

Permalink
Update timeline resources
Browse files Browse the repository at this point in the history
Add getRetweetedToUser() and getRetweetedByUser(), deprecated
getPublicTimeline() and getFriendsTimeline()
  • Loading branch information
jdub committed Mar 10, 2012
1 parent 806a2d8 commit 5fa1af0
Showing 1 changed file with 30 additions and 16 deletions.
46 changes: 30 additions & 16 deletions lib/twitter.js
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5fa1af0

Please sign in to comment.