История изменений
Исправление steemandlinux, (текущая версия) :
Такое пойдёт для продакшена?
def _query(self, arg=None):
self.req = arg
callframe = inspect.getouterframes(inspect.currentframe(), 2)[1][3]
self.url = "https://www.cryptopia.co.nz/Api/{}".format(callframe)
if type(self.req) is dict:
headers, post_data = self._private()
method = 'POST'
url = self.url
elif type(self.req) is str:
headers = {'Connection': 'close'}
post_data = None
method = 'GET'
url = "{}/{}".format(self.url, self.req)
elif self.req is None:
headers = {'Connection': 'close'}
post_data = None
method = 'GET'
url = self.url
else:
raise self.GlobalError("API request error")
Исправление steemandlinux, :
Такое пойдёт для продакшена?
def _query(self, arg=None):
self.req = arg
callframe = inspect.getouterframes(inspect.currentframe(), 2)[1][3]
self.url = "https://www.cryptopia.co.nz/Api/{}".format(callframe)
if type(self.req) is dict:
headers, post_data = self._private()
method = 'POST'
url = self.url
elif type(self.req) is str:
headers = {'Connection': 'close'}
post_data = None
method = 'GET'
url = "{}/{}".format(self.url, self.req)
elif self.req is None:
headers = {'Connection': 'close'}
post_data = None
method = 'GET'
url = self.url
else:
raise self.GlobalError("API request)
Исходная версия steemandlinux, :
Такое пойдёт для продакшена?
def _query(self, arg=None):
self.req = arg
callframe = inspect.getouterframes(inspect.currentframe(), 2)[1][3]
self.url = "https://www.cryptopia.co.nz/Api/{}".format(callframe)
if type(self.req) is dict:
headers, post_data = self._private()
method = 'POST'
url = self.url
elif type(self.req) is str:
headers = {'Connection': 'close'}
post_data = None
method = 'GET'
url = "{}/{}".format(self.url, self.req)
elif self.req is None:
headers = {'Connection': 'close'}
post_data = None
method = 'GET'
url = self.url
else:
raise self.GlobalError("API request)