From d43c8769096b1b8fdc098edbdfe3ce3b180ddc0d Mon Sep 17 00:00:00 2001 From: harcek Date: Fri, 7 Oct 2011 15:01:43 -0700 Subject: [PATCH] Updated Status Methods (textile) --- Status-Methods.textile | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/Status-Methods.textile b/Status-Methods.textile index 3968e0a..936e776 100644 --- a/Status-Methods.textile +++ b/Status-Methods.textile @@ -1,6 +1,7 @@ h2. Status methods The methods below deal with showing, updating, and deleting status messages on Twitter. + Opening remark: all examples have been tested on Twython 1.4.3 h3. updateStatus() @@ -9,15 +10,19 @@ Updates your status on Twitter - requires authentication Parameters * status: (Required) The status message you're updating with. -* in_reply_to: (Optional) An optional status ID that this message is in reply to. +* in_reply_to_status_id: (Optional) An optional status ID that this message is in reply to.
 
-import twython
+from twython import Twython
 
-# Instantiate with Basic (HTTP) Authentication
-twitter = twython.core.setup(username="example", password="example")
-twitter.updateStatus("See how easy this was?")
+APPTOK = "xXxXxXxXxXxXxX"
+APPSEC = "xXxXxXxXxXxXxX"
+OAUTOK = "xXxXxXxXxXxXxX"
+OAUSEC = "xXxXxXxXxXxXxX"
+
+twitter = Twython(APPTOK, APPSEC, OAUTOK, OAUSEC)
+twitter.updateStatus(status="See how easy this was?")
 
 
@@ -32,11 +37,15 @@ Parameters
 
-import twython
+from twython import Twython
 
-# Instantiate with Basic (HTTP) Authentication
-twitter = twython.core.setup(username="example", password="example")
-twitter.destroyStatus("12344545")
+APPTOK = "xXxXxXxXxXxXxX"
+APPSEC = "xXxXxXxXxXxXxX"
+OAUTOK = "xXxXxXxXxXxXxX"
+OAUSEC = "xXxXxXxXxXxXxX"
+
+twitter = Twython(APPTOK, APPSEC, OAUTOK, OAUSEC)
+twitter.destroyStatus(id="12344545")
 
 
@@ -50,11 +59,11 @@ Parameters
 
-import twython
+from twython import Twython
 
 # Instantiate with no Auth - Auth might be needed if user is protected
-twitter = twython.core.setup()
-status = twitter.showStatus("123")
+twitter = Twython()
+status = twitter.showStatus(id="123")
 
 print status["text"]