Skip to content

Commit ac3a0c5

Browse files
authored
Merge pull request #11 from uJhin/1.2.0
Update Version 1.2.0.3
2 parents 6b65843 + 39747ac commit ac3a0c5

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

upbit/pkginfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def _get_versions(package_name):
2929
PACKAGE_NAME = 'upbit-client'
3030

3131
OPEN_API_VERSION = '1.2.0'
32-
CURRENT_VERSION = OPEN_API_VERSION+'.2'
32+
CURRENT_VERSION = OPEN_API_VERSION+'.3'
3333

3434
RELEASED_VERSION = _get_versions(PACKAGE_NAME)
3535
LATEST_VERSION = RELEASED_VERSION[0]

upbit/utils.py

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,34 @@ def remaining_request(headers: dict) -> dict:
2727
def future_extraction(http_future) -> dict:
2828
resp = http_future.future.result()
2929
remaining = HTTPFutureExtractor.remaining_request(resp.headers)
30+
3031
# resp.raise_for_status()
31-
return {
32+
33+
result = {
3234
"remaining_request": remaining,
33-
"result": resp.json()
35+
"response": {
36+
"url": resp.url,
37+
"headers": resp.headers,
38+
"status_code": resp.status_code,
39+
"reason": resp.reason,
40+
"text": resp.text,
41+
"content": resp.content,
42+
"ok": resp.ok
43+
}
3444
}
3545

46+
try:
47+
result['result'] = resp.json()
48+
except:
49+
result['result'] = {
50+
"error": {
51+
"message": resp.text,
52+
"name": resp.reason
53+
}
54+
}
55+
finally:
56+
return result
57+
3658

3759
class Validator:
3860

0 commit comments

Comments
 (0)