Skip to content

Commit 531759c

Browse files
committed
Testing v3
1 parent 0905afe commit 531759c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

bigcommerce/connection.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,9 @@ def _handle_response(self, url, res, suppress_empty=True):
160160
if res.status_code in (200, 201, 202):
161161
try:
162162
result = res.json()
163-
print type(result)
164-
print "RAW OUTPUT:", result
165-
print '-----------------------------------'
166-
print type(res)
167-
print "RAW OUTPUT:", res
163+
# Support v3
164+
if self.api_path and 'v3' in self.api_path:
165+
result['data'] #TODO ignore meta field for now
168166
except Exception as e: # json might be invalid, or store might be down
169167
e.message += " (_handle_response failed to decode JSON: " + str(res.content) + ")"
170168
raise # TODO better exception

0 commit comments

Comments
 (0)