Updated Status Methods (textile)
parent
c29520fdb3
commit
d43c876909
1 changed files with 21 additions and 12 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
h2. Status methods
|
h2. Status methods
|
||||||
|
|
||||||
The methods below deal with showing, updating, and deleting status messages on Twitter.
|
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()
|
h3. updateStatus()
|
||||||
|
|
||||||
|
|
@ -9,15 +10,19 @@ Updates your status on Twitter - <b>requires authentication</b>
|
||||||
Parameters
|
Parameters
|
||||||
|
|
||||||
* <b>status:</b> (Required) The status message you're updating with.
|
* <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>
|
<pre>
|
||||||
<code>
|
<code>
|
||||||
import twython
|
from twython import Twython
|
||||||
|
|
||||||
# Instantiate with Basic (HTTP) Authentication
|
APPTOK = "xXxXxXxXxXxXxX"
|
||||||
twitter = twython.core.setup(username="example", password="example")
|
APPSEC = "xXxXxXxXxXxXxX"
|
||||||
twitter.updateStatus("See how easy this was?")
|
OAUTOK = "xXxXxXxXxXxXxX"
|
||||||
|
OAUSEC = "xXxXxXxXxXxXxX"
|
||||||
|
|
||||||
|
twitter = Twython(APPTOK, APPSEC, OAUTOK, OAUSEC)
|
||||||
|
twitter.updateStatus(status="See how easy this was?")
|
||||||
</code>
|
</code>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
@ -32,11 +37,15 @@ Parameters
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<code>
|
<code>
|
||||||
import twython
|
from twython import Twython
|
||||||
|
|
||||||
# Instantiate with Basic (HTTP) Authentication
|
APPTOK = "xXxXxXxXxXxXxX"
|
||||||
twitter = twython.core.setup(username="example", password="example")
|
APPSEC = "xXxXxXxXxXxXxX"
|
||||||
twitter.destroyStatus("12344545")
|
OAUTOK = "xXxXxXxXxXxXxX"
|
||||||
|
OAUSEC = "xXxXxXxXxXxXxX"
|
||||||
|
|
||||||
|
twitter = Twython(APPTOK, APPSEC, OAUTOK, OAUSEC)
|
||||||
|
twitter.destroyStatus(id="12344545")
|
||||||
</code>
|
</code>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
@ -50,11 +59,11 @@ Parameters
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<code>
|
<code>
|
||||||
import twython
|
from twython import Twython
|
||||||
|
|
||||||
# Instantiate with no Auth - Auth might be needed if user is protected
|
# Instantiate with no Auth - Auth might be needed if user is protected
|
||||||
twitter = twython.core.setup()
|
twitter = Twython()
|
||||||
status = twitter.showStatus("123")
|
status = twitter.showStatus(id="123")
|
||||||
|
|
||||||
print status["text"]
|
print status["text"]
|
||||||
</code>
|
</code>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue