BigW Consortium Gitlab

Commit a3eac450 by Dan McKinley

Merge pull request #6 from alekstorm/endpoint_update

Update API endpoint URLs
parents caad6946 760f241f
......@@ -8,16 +8,14 @@ except ImportError:
from cgi import parse_qsl
class EtsyV2(API):
api_url = 'http://openapi.etsy.com/v2/sandbox/public'
api_version = 'v2'
def __init__(self, api_key='', key_file=None, method_cache=missing,
etsy_env=EtsyEnvSandbox(), log=None, etsy_oauth_client=None):
self.api_url = etsy_env.public_api_url
self.api_url = etsy_env.api_url
self.etsy_oauth_client = None
if etsy_oauth_client:
self.api_url = etsy_env.private_api_url
self.etsy_oauth_client = etsy_oauth_client
super(EtsyV2, self).__init__(api_key, key_file, method_cache, log)
......
class EtsyEnvSandbox(object):
request_token_url = 'http://openapi.etsy.com/v2/sandbox/oauth/request_token'
access_token_url = 'http://openapi.etsy.com/v2/sandbox/oauth/access_token'
request_token_url = 'http://sandbox.openapi.etsy.com/v2/oauth/request_token'
access_token_url = 'http://sandbox.openapi.etsy.com/v2/oauth/access_token'
signin_url = 'https://www.etsy.com/oauth/signin'
public_api_url = 'http://openapi.etsy.com/v2/sandbox/public'
private_api_url = 'http://openapi.etsy.com/v2/sandbox/private'
api_url = 'http://sandbox.openapi.etsy.com/v2'
class EtsyEnvProduction(object):
request_token_url = 'http://openapi.etsy.com/v2/oauth/request_token'
access_token_url = 'http://openapi.etsy.com/v2/oauth/access_token'
signin_url = 'https://www.etsy.com/oauth/signin'
public_api_url = 'http://openapi.etsy.com/v2/public'
private_api_url = 'http://openapi.etsy.com/v2/private'
api_url = 'http://openapi.etsy.com/v2'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment