diff --git a/Timeline-Access.textile b/Timeline-Access.textile new file mode 100644 index 0000000..7e78d38 --- /dev/null +++ b/Timeline-Access.textile @@ -0,0 +1,87 @@ + Listed below are the various ways to access Twitter's different timeline permutations. Some require Authentication at certain points, so pay attention. + +h2. getPublicTimeline() + +Returns the public timeline. This is easily one of the simplest methods for getting data in all of Tango. + +
+
+import tango
+
+# Getting the public timeline requires no authentication, huzzah
+twitter = tango.setup()
+public_timeline = twitter.getPublicTimeline()
+
+for tweet in public_timeline:
+ print tweet["text"]
+
+
+
+h2. getFriendsTimeline()
+
+Returns a timeline for all the users the authenticating user is following. This (obviously) requires authentication.
+
+Parameters:
+ * since_id: (Optional) The farthest tweet id back in time that you want results on.
+ * max_id: (Optional) The closest tweet id in time that you want results on.
+ * count: (Optional) The amount of results you want back. Per Twitter, this may not be greater than 200.
+ * page: (Optional) The number of pages of results you want back.
+
+
+
+import tango
+
+# Authenticate using Basic (HTTP) Authentication
+twitter = tango.setup(authtype="Basic", username="example", password="example")
+friends_timeline = twitter.getFriendsTimeline(count="150", page="3")
+
+for tweet in friends_timeline:
+ print tweet["text"]
+
+
+
+h2. getUserTimeline()
+
+Returns a timeline for the specified user. If no user is specified, and a user is currently authenticated, this method will return the timeline for the currently authenticated user. This requires authentication if the specified user has a private account (subsequently, you must be friends with them to get their timeline).
+
+Parameters:
+ * id: (Optional) The id or screen name of the user you want a timeline for.
+ * user_id: (Optional) The id of the user you want a timeline for.
+ * screen_name: (Optional) The screen name of the user you want a timeline for.
+ * since_id: (Optional) The farthest tweet id back in time that you want results on.
+ * max_id: (Optional) The closest tweet id in time that you want results on.
+ * count: (Optional) The amount of results you want back. Per Twitter, this may not be greater than 200.
+ * page: (Optional) The number of pages of results you want back.
+
+
+
+import tango
+
+# We won't authenticate for this, but sometimes it's necessary
+twitter = tango.setup()
+user_timeline = twitter.getUserTimeline(screen_name="ryanmcgrath")
+
+print user_timeline
+
+
+
+h2. getFriendsTimeline()
+
+Returns a set of 20 "@" mentions pertaining to the authenticating user (this, obviously, requires authentication).
+
+Parameters:
+ * since_id: (Optional) The farthest tweet id back in time that you want results on.
+ * max_id: (Optional) The closest tweet id in time that you want results on.
+ * count: (Optional) The amount of results you want back. Per Twitter, this may not be greater than 200.
+ * page: (Optional) The number of pages of results you want back.
+
+
+
+import tango
+
+twitter = tango.setup(authtype="Basic", username="example", password="example")
+mentions = twitter.getUserMentions(count="150")
+
+print mentions
+
+
\ No newline at end of file