Skip to content

Commit

Permalink
Reordered functions to match Twitter docs.
Browse files Browse the repository at this point in the history
I'm trying to keep these functions in the order they appear in the
Twitter docs, because I think it might be easier to look them up later.

	modified:   utils.py
  • Loading branch information
ccg authored and bruntonspall committed Dec 14, 2009
1 parent 2956663 commit 6b6c5a3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions twitter_app/utils.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -73,12 +73,6 @@ def is_authenticated(consumer, connection, access_token):
return json return json
return False return False


def get_friends(consumer, connection, access_token, page=0):
"""Get friends on Twitter"""
oauth_request = request_oauth_resource(consumer, TWITTER_FRIENDS, access_token, {'page': page})
json = fetch_response(oauth_request, connection)
return json

def update_status(consumer, connection, access_token, status): def update_status(consumer, connection, access_token, status):
"""Update twitter status, i.e., post a tweet""" """Update twitter status, i.e., post a tweet"""
oauth_request = request_oauth_resource(consumer, oauth_request = request_oauth_resource(consumer,
Expand All @@ -88,3 +82,9 @@ def update_status(consumer, connection, access_token, status):
http_method='POST') http_method='POST')
json = fetch_response(oauth_request, connection) json = fetch_response(oauth_request, connection)
return json return json

def get_friends(consumer, connection, access_token, page=0):
"""Get friends on Twitter"""
oauth_request = request_oauth_resource(consumer, TWITTER_FRIENDS, access_token, {'page': page})
json = fetch_response(oauth_request, connection)
return json

0 comments on commit 6b6c5a3

Please sign in to comment.