]> jfr.im git - z_archive/twitter.git/blobdiff - twitter/api.py
use expanduser to support paths with ~
[z_archive/twitter.git] / twitter / api.py
index 1e249d5d1f3e12bc4b8076220dff30459181da53..608b08f9670cc52d16e2760cddd358076cccd428 100644 (file)
@@ -127,7 +127,8 @@ class Twitter(TwitterCall):
 
     Examples::
 
-      twitter = Twitter("hello@foo.com", "password123")
+      twitter = Twitter(
+          auth=OAuth(token, token_key, con_secret, con_secret_key)))
 
       # Get the public timeline
       twitter.statuses.public_timeline()
@@ -143,6 +144,7 @@ class Twitter(TwitterCall):
           user="billybob",
           text="I think yer swell!")
 
+
     Searching Twitter::
 
       twitter_search = Twitter(domain="search.twitter.com")
@@ -183,16 +185,25 @@ class Twitter(TwitterCall):
     """
     def __init__(
         self, email=None, password=None, format="json",
-        domain="api.twitter.com", agent=None, secure=True, auth=None,
+        domain="twitter.com", agent=None, secure=True, auth=None,
         api_version=''):
         """
         Create a new twitter API connector.
 
         Pass an `auth` parameter to use the credentials of a specific
         user. Generally you'll want to pass an `OAuth`
-        instance. Alternately you can pass `email` and `password`
-        parameters but this authentication mode will be deactive by
-        Twitter in the future and is not recommended.
+        instance::
+
+            twitter = Twitter(auth=OAuth(
+                    token, token_secret, consumer_key, consumer_secret))
+
+
+        Alternately you can pass `email` and `password` parameters but
+        this authentication mode will be deactive by Twitter very soon
+        and is not recommended::
+
+            twitter = Twitter(email="blah@blah.com", password="foobar")
+
 
         `domain` lets you change the domain you are connecting. By
         default it's twitter.com but `search.twitter.com` may be