Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twitter API 1.1 Adaptation #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ module.exports = {
authenticate_url: 'https://api.twitter.com/oauth/authenticate',
authorize_url: 'https://api.twitter.com/oauth/authorize',
rest_base: 'https://api.twitter.com/1.1',
search_base: 'http://search.twitter.com',
stream_base: 'https://stream.twitter.com/1.1',
search_base: 'https://api.twitter.com/1.1',
stream_base: 'https://stream.twitter.com/1.1',
user_stream_base: 'https://userstream.twitter.com/1.1',
site_stream_base: 'https://sitestream.twitter.com/1.1'
}
Expand Down
13 changes: 7 additions & 6 deletions lib/twitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Twitter.prototype.search = function(q, params, callback) {
return this;
}

var url = this.options.search_base + '/search.json';
var url = this.options.search_base + '/search/tweets.json';
params = utils.merge(params, {q:q});
this.get(url, params, callback);
return this;
Expand Down Expand Up @@ -515,9 +515,9 @@ Twitter.prototype.getRetweetedByUser = function(params, callback){

// Tweets resources

Twitter.prototype.showStatus = function(id, callback) {
Twitter.prototype.showStatus = function(id, params, callback) {
var url = '/statuses/show/' + escape(id) + '.json';
this.get(url, null, callback);
this.get(url, params, callback);
return this;
}
Twitter.prototype.getStatus
Expand Down Expand Up @@ -1014,9 +1014,10 @@ Twitter.prototype.verifyCredentials = function(callback) {
return this;
}

Twitter.prototype.rateLimitStatus = function(callback) {
var url = '/account/rate_limit_status.json';
this.get(url, null, callback);
Twitter.prototype.rateLimitStatus = function(params, callback) {
// params: resources
var url = '/application/rate_limit_status.json';
this.get(url, params, callback);
return this;
}

Expand Down