Permalink
Browse files

Update api endpoints to use version 1.1

  • Loading branch information...
danmactough committed Jun 14, 2013
1 parent 11d1168 commit bcfe3ee92068d94bf1d4e14260b34f04fd83c905
Showing with 17 additions and 17 deletions.
  1. +17 −17 twitter_oauth.py
View
@@ -28,17 +28,17 @@
# Tiwtter Api URL
_UPDATE_URL = 'http://api.twitter.com/1/statuses/update.json'
_FRIENDS_TIMELINE_URL = 'http://api.twitter.com/1/statuses/friends_timeline.json'
_USER_TIMELINE_URL = 'http://api.twitter.com/1/statuses/user_timeline.json'
_REPLIES_URL = 'http://api.twitter.com/1/statuses/replies.json'
_SHOW_STATUS_URL = 'http://api.twitter.com/1/statuses/show/%s.json'
_DESTROY_URL = 'http://api.twitter.com/1/statuses/destroy/%s.json'
_LIST_STATUS_URL = 'http://api.twitter.com/1/%s/lists/%s/statuses.json'
_CREATE_FRIENDSHIP_URL = 'http://api.twitter.com/1/friendships/create/%s.json'
_DESTROY_FRIENDSHIP_URL = 'http://api.twitter.com/1/friendships/destroy/%s.json'
_SEARCH_USER_URL = 'http://api.twitter.com/1/users/search.json'
_SHOW_USER_URL = 'http://api.twitter.com/1/users/show/%s.json'
_UPDATE_URL = 'http://api.twitter.com/1.1/statuses/update.json'
_FRIENDS_TIMELINE_URL = 'http://api.twitter.com/1.1/statuses/friends_timeline.json'
_USER_TIMELINE_URL = 'http://api.twitter.com/1.1/statuses/user_timeline.json'
_REPLIES_URL = 'http://api.twitter.com/1.1/statuses/replies.json'
_SHOW_STATUS_URL = 'http://api.twitter.com/1.1/statuses/show/%s.json'
_DESTROY_URL = 'http://api.twitter.com/1.1/statuses/destroy/%s.json'
_LIST_STATUS_URL = 'http://api.twitter.com/1.1/%s/lists/%s/statuses.json'
_CREATE_FRIENDSHIP_URL = 'http://api.twitter.com/1.1/friendships/create/%s.json'
_DESTROY_FRIENDSHIP_URL = 'http://api.twitter.com/1.1/friendships/destroy/%s.json'
_SEARCH_USER_URL = 'http://api.twitter.com/1.1/users/search.json'
_SHOW_USER_URL = 'http://api.twitter.com/1.1/users/show/%s.json'
_SEARCH_URL = 'http://search.twitter.com/search.json'
@@ -987,7 +987,7 @@ def get_list_status(self, user, list_id, since_id=None, max_id=None, per_page=No
# create URL. append querry to a URL
#
# _LIST_STATUS_URL = 'http://api.twitter.com/1/%s/lists/%s/statuses.xml'
# _LIST_STATUS_URL = 'http://api.twitter.com/1.1/%s/lists/%s/statuses.xml'
param = '&'.join(url_param_list)
if param:
url = (_LIST_STATUS_URL % (user, list_id)) + '?' + param
@@ -1020,7 +1020,7 @@ def create_friendship(self, id, follow=None):
# create URL. append querry to a URL
#
# _LIST_STATUS_URL = 'http://api.twitter.com/1/%s/lists/%s/statuses.xml'
# _LIST_STATUS_URL = 'http://api.twitter.com/1.1/%s/lists/%s/statuses.xml'
param = '&'.join(url_param_list)
if param:
url = (_CREATE_FRIENDSHIP_URL % id) + '?' + param
@@ -1052,7 +1052,7 @@ def destroy_friendship(self, id):
# create URL. append querry to a URL
#
# _LIST_STATUS_URL = 'http://api.twitter.com/1/%s/lists/%s/statuses.xml'
# _LIST_STATUS_URL = 'http://api.twitter.com/1.1/%s/lists/%s/statuses.xml'
param = '&'.join(url_param_list)
if param:
url = (_DESTROY_FRIENDSHIP_URL % id) + '?' + param
@@ -1087,7 +1087,7 @@ def search_user(self, q, per_page=None, page=None):
# create URL. append querry to a URL
#
# _LIST_STATUS_URL = 'http://api.twitter.com/1/%s/lists/%s/statuses.xml'
# _LIST_STATUS_URL = 'http://api.twitter.com/1.1/%s/lists/%s/statuses.xml'
param = urllib.urlencode(url_param_dict)
if param:
url = _SEARCH_USER_URL + '?' + param
@@ -1119,7 +1119,7 @@ def show_user(self, id):
# create URL. append querry to a URL
#
# _LIST_STATUS_URL = 'http://api.twitter.com/1/%s/lists/%s/statuses.xml'
# _LIST_STATUS_URL = 'http://api.twitter.com/1.1/%s/lists/%s/statuses.xml'
param = '&'.join(url_param_list)
if param:
url = (_SHOW_USER_URL % id) + '?' + param
@@ -1163,7 +1163,7 @@ def search(self, q, callback=None, lang=None, locale=None,
# create URL. append querry to a URL
#
# _LIST_STATUS_URL = 'http://api.twitter.com/1/%s/lists/%s/statuses.xml'
# _LIST_STATUS_URL = 'http://api.twitter.com/1.1/%s/lists/%s/statuses.xml'
param = urllib.urlencode(url_param_dict)
if param:
url = _SEARCH_URL + '?' + param

0 comments on commit bcfe3ee

Please sign in to comment.