Updated Status Methods (textile)

harcek 2011-10-07 15:01:43 -07:00
parent c29520fdb3
commit d43c876909

@ -1,6 +1,7 @@
h2. Status methods
The methods below deal with showing, updating, and deleting status messages on Twitter.
<b> Opening remark: </b> all examples have been tested on Twython 1.4.3
h3. updateStatus()
@ -9,15 +10,19 @@ Updates your status on Twitter - <b>requires authentication</b>
Parameters
* <b>status:</b> (Required) The status message you're updating with.
* <b>in_reply_to:</b> (Optional) An optional status ID that this message is in reply to.
* <b>in_reply_to_status_id:</b> (Optional) An optional status ID that this message is in reply to.
<pre>
<code>
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?")
</code>
</pre>
@ -32,11 +37,15 @@ Parameters
<pre>
<code>
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")
</code>
</pre>
@ -50,11 +59,11 @@ Parameters
<pre>
<code>
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"]
</code>