return new class for each ox.API call
This commit is contained in:
parent
d38da54a17
commit
714729fee7
1 changed files with 86 additions and 83 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue