Created
October 29, 2011 21:46
-
-
Save atypical/1325136 to your computer and use it in GitHub Desktop.
example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
userTimeline: function (screenName, sinceId, success, failure, options) | |
{ | |
options = options || {}; | |
var url = OAuth.Twitter.API_URL + | |
OAuth.Twitter.API_VERSION + | |
OAuth.Twitter.API_USER_TIMELINE + '.' + | |
OAuth.Twitter.API_FORMAT; | |
var userId = parseInt(screenName, 10); | |
if (userId == screenName) | |
{ | |
options.userId = userId; | |
} | |
else | |
{ | |
options.screenName = screenName; | |
} | |
var allowed_options = { | |
'screenName': 'screen_name', | |
'userId': 'user_id', | |
'count': 'count', | |
'page': 'page', | |
'maxId': 'max_id', | |
'trimUser': 'trim_user', | |
'includeRetweets': 'include_rts', | |
'includeEntities': 'include_entities', | |
'excludeReplies': 'exclude_replies', | |
'contributorDetails': 'contributor_details' | |
}; | |
var defaults = { | |
'trimUser': true, | |
'includeRetweets': true, | |
'includeEntities': true, | |
'excludeReplies': false, | |
'contributorDetails': true | |
}; | |
url += optionsToQueryString(options, allowed_options, defaults); | |
this.oauth.getJSON(url, success, failure); | |
return this; | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment