Skip to content

Commit e163327

Browse files
committed
Testing v3
1 parent f0e41ff commit e163327

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

bigcommerce/api.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ def __init__(self, host=None, api_path=None, basic_auth=None,
1111
self.auth_service = os.getenv('BC_AUTH_SERVICE', 'login.bigcommerce.com')
1212

1313
if host and basic_auth:
14-
print 'Entering basic_auth'
1514
self.connection = connection.Connection(host, basic_auth)
1615
elif client_id and store_hash:
17-
print 'Entering OAuthConnection'
1816
self.connection = connection.OAuthConnection(client_id, store_hash, access_token, self.api_service,
1917
api_path=api_path,
2018
rate_limiting_management=rate_limiting_management)

bigcommerce/connection.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ def _run_method(self, method, url, data=None, query=None, headers=None):
5353
if headers is None:
5454
headers = {}
5555

56+
# Support v3
57+
if self.api_path and 'v3' in self.api_path:
58+
print "SUPPORTING V3"
59+
60+
print 'Before Encoding URL', url
5661
# make full path if not given
5762
if url and url[:4] != "http":
5863
if url[0] == '/': # can call with /resource if you want
@@ -66,6 +71,8 @@ def _run_method(self, method, url, data=None, query=None, headers=None):
6671
qs = "?" + qs
6772
url += qs
6873

74+
print 'After Encoding URL', url
75+
6976
# mess with content
7077
if data:
7178
if not headers: # assume JSON

0 commit comments

Comments
 (0)