Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion upbit/pkginfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def _get_versions(package_name):
PACKAGE_NAME = 'upbit-client'

OPEN_API_VERSION = '1.2.0'
CURRENT_VERSION = OPEN_API_VERSION+'.2'
CURRENT_VERSION = OPEN_API_VERSION+'.3'

RELEASED_VERSION = _get_versions(PACKAGE_NAME)
LATEST_VERSION = RELEASED_VERSION[0]
Expand Down
26 changes: 24 additions & 2 deletions upbit/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,34 @@ def remaining_request(headers: dict) -> dict:
def future_extraction(http_future) -> dict:
resp = http_future.future.result()
remaining = HTTPFutureExtractor.remaining_request(resp.headers)

# resp.raise_for_status()
return {

result = {
"remaining_request": remaining,
"result": resp.json()
"response": {
"url": resp.url,
"headers": resp.headers,
"status_code": resp.status_code,
"reason": resp.reason,
"text": resp.text,
"content": resp.content,
"ok": resp.ok
}
}

try:
result['result'] = resp.json()
except:
result['result'] = {
"error": {
"message": resp.text,
"name": resp.reason
}
}
finally:
return result


class Validator:

Expand Down