Updating version to 0.8.0.1, as showStatus() had a bug with authentication and needed to be pushed out

This commit is contained in:
Ryan McGrath 2009-07-29 00:10:34 -04:00
parent c83a033765
commit 91e03fe7ef
9 changed files with 58 additions and 4 deletions

View file

@ -151,7 +151,10 @@ class setup:
def showStatus(self, id): def showStatus(self, id):
try: try:
if self.authenticated is True:
return simplejson.load(self.opener.open("http://twitter.com/statuses/show/%s.json" % id)) return simplejson.load(self.opener.open("http://twitter.com/statuses/show/%s.json" % id))
else:
return simplejson.load(urllib2.urlopen("http://twitter.com/statuses/show/%s.json" % id))
except HTTPError, e: except HTTPError, e:
raise TangoError("Failed with a %s error code. Does this user hide/protect their updates? You'll need to authenticate and be friends to get their timeline." raise TangoError("Failed with a %s error code. Does this user hide/protect their updates? You'll need to authenticate and be friends to get their timeline."
% `e.code`, e.code) % `e.code`, e.code)

BIN
dist/tango-0.7.tar.gz vendored

Binary file not shown.

Binary file not shown.

BIN
dist/tango-0.8.0.1.tar.gz vendored Normal file

Binary file not shown.

BIN
dist/tango-0.8.0.1.win32.exe vendored Normal file

Binary file not shown.

BIN
dist/tango-0.8.tar.gz vendored Normal file

Binary file not shown.

BIN
dist/tango-0.8.win32.exe vendored Normal file

Binary file not shown.

View file

@ -1,7 +1,9 @@
#!/usr/bin/python #!/usr/bin/python
import sys, os
__author__ = 'Ryan McGrath <ryan@venodesigns.net>' __author__ = 'Ryan McGrath <ryan@venodesigns.net>'
__version__ = '0.7' __version__ = '0.8.0.1'
# For the love of god, use Pip to install this. # For the love of god, use Pip to install this.
@ -13,6 +15,7 @@ METADATA = dict(
author='Ryan McGrath', author='Ryan McGrath',
author_email='ryan@venodesigns.net', author_email='ryan@venodesigns.net',
description='A new and easy way to access Twitter data with Python.', description='A new and easy way to access Twitter data with Python.',
long_description= open("README").read(),
license='MIT License', license='MIT License',
url='http://github.com/ryanmcgrath/tango/tree/master', url='http://github.com/ryanmcgrath/tango/tree/master',
keywords='twitter search api tweet tango', keywords='twitter search api tweet tango',

View file

@ -1,12 +1,60 @@
Metadata-Version: 1.0 Metadata-Version: 1.0
Name: tango Name: tango
Version: 0.7 Version: 0.8.0.1
Summary: A new and easy way to access Twitter data with Python. Summary: A new and easy way to access Twitter data with Python.
Home-page: http://github.com/ryanmcgrath/tango/tree/master Home-page: http://github.com/ryanmcgrath/tango/tree/master
Author: Ryan McGrath Author: Ryan McGrath
Author-email: ryan@venodesigns.net Author-email: ryan@venodesigns.net
License: MIT License License: MIT License
Description: UNKNOWN Description: Tango - Easy Twitter utilities in Python
-----------------------------------------------------------------------------------------------------
I wrote Tango because I found that other Python Twitter libraries weren't that up to date. Certain
things like the Search API, OAuth, etc, don't seem to be fully covered. This is my attempt at
a library that offers more coverage.
This is my first library I've ever written in Python, so there could be some stuff in here that'll
make a seasoned Python vet scratch his head, or possibly call me insane. It's open source, though,
and I'm open to anything that'll improve the library as a whole.
OAuth support is in the works, but every other part of the Twitter API should be covered. Tango
handles both Basic (HTTP) Authentication and OAuth, and OAuth is the default method for
Authentication. To override this, specify 'authtype="Basic"' in your tango.setup() call.
Documentation is forthcoming, but Tango attempts to mirror the Twitter API in a large way. All
parameters for API calls should translate over as function arguments.
Requirements
-----------------------------------------------------------------------------------------------------
Tango requires (much like Python-Twitter, because they had the right idea :D) a library called
"simplejson". You can grab it at the following link:
http://pypi.python.org/pypi/simplejson
Example Use
-----------------------------------------------------------------------------------------------------
import tango
twitter = tango.setup(authtype="Basic", username="example", password="example")
twitter.updateStatus("See how easy this was?")
Tango 3k
-----------------------------------------------------------------------------------------------------
There's an experimental version of Tango that's made for Python 3k. This is currently not guaranteed
to work, but it's provided so that others can grab it and hack on it. If you choose to try it out,
be aware of this.
Questions, Comments, etc?
-----------------------------------------------------------------------------------------------------
My hope is that Tango is so simple that you'd never *have* to ask any questions, but if
you feel the need to contact me for this (or other) reasons, you can hit me up
at ryan@venodesigns.net.
Tango is released under an MIT License - see the LICENSE file for more information.
Keywords: twitter search api tweet tango Keywords: twitter search api tweet tango
Platform: UNKNOWN Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta Classifier: Development Status :: 4 - Beta