return new class for each ox.API call

This commit is contained in:
j 2013-11-02 17:40:01 +01:00
parent d38da54a17
commit 714729fee7

View file

@ -13,7 +13,7 @@ from .form import MultiPartForm
__all__ = ['API']
def API(url, cj=None):
class API(object):
__version__ = 0.0
__name__ = 'ox'
@ -104,3 +104,6 @@ class API(object):
if data:
form.add_field('data', json.dumps(data))
return self._json_request(self.url, form)
return API(url, cj)