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

This commit is contained in:
Mesar Hameed 2011-11-30 14:29:51 +00:00
parent 650a69ec17
commit 4710c49b28

View file

@ -156,6 +156,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):
"""