Allow for easier debugging/development, by registering endpoints directly into Twython.

This commit is contained in:
Mesar Hameed 2011-11-24 13:15:23 +00:00
parent d93651c486
commit 650a69ec17

View file

@ -168,6 +168,9 @@ class Twython(object):
else:
# If they don't do authentication, but still want to request unprotected resources, we need an opener.
self.client = httplib2.Http(**client_args)
# register available funcs to allow listing name when debugging.
for key in api_table.keys():
self.__dict__[key] = self.__getattr__(key)
def __getattr__(self, api_call):
"""