Skip to content

Instantly share code, notes, and snippets.

@rosskarchner
Last active August 29, 2015 13:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rosskarchner/9921573 to your computer and use it in GitHub Desktop.
Save rosskarchner/9921573 to your computer and use it in GitHub Desktop.
import adnpy
import sys
# Set the default access token for API calls.
adnpy.api.add_authorization_token('AQAAAAAACqdtFdqwsJmFbaDL036aIM8RDgQKvbDhXBfFJRMl0IQkurrGfBROJQ5Qx0mEf0oYYdnecAyEZR29jgkEPUTaPes_zg')
while True:
try:
text = raw_input('> ')
if text:
post, meta = adnpy.api.create_post(data={'text':text})
except EOFError:
print "\ngoodbye!"
sys.exit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment