Skip to content

Commit

Permalink
Merge pull request #13 from uJhin/1.2.0
Browse files Browse the repository at this point in the history
Update Version 1.2.0.3
  • Loading branch information
uJhin authored Mar 19, 2021
2 parents 083d27f + 5e0f4c5 commit 30dbfbf
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/python/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 client/python/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

0 comments on commit 30dbfbf

Please sign in to comment.