Commit 2d152504 authored by Josh Roesslein's avatar Josh Roesslein
Browse files

Added method to set credentials.

parent 5071d2f4
......@@ -12,7 +12,7 @@ class API(object):
classes={'user': User, 'status': Status,
'direct_message': DirectMessage, 'friendship': Friendship}):
if username and password:
self._b64up = base64.b64encode('%s:%s' % (username, password))
self.set_credentials(username, password)
else:
self._b64up = None
self.host = host
......@@ -20,6 +20,10 @@ class API(object):
self.classes = classes
self.username = username
def set_credentials(username, password):
self._b64up = base64.b64encode('%s:%s' % (username, password))
self.username = username
"""Get public timeline"""
public_timeline = bind_api(
path = '/statuses/public_timeline.json',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment