Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions etsy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
from _v2 import EtsyV2 as Etsy
from etsy_env import EtsyEnvSandbox, EtsyEnvProduction
from env import EtsyEnvSandbox, EtsyEnvProduction


__version__ = '0.3.1'
__author__ = 'Dan McKinley'
__copyright__ = 'Copyright 2010, Etsy Inc.'
__license__ = 'GPL v3'
__email__ = 'dan@etsy.com'

2 changes: 1 addition & 1 deletion etsy/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import re
import tempfile
import time
from _multipartformdataencode import encode_multipart_formdata
from _util import encode_multipart_formdata


missing = object()
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions etsy/_v2.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import urllib
from _core import API, missing
from etsy_env import EtsyEnvSandbox, EtsyEnvProduction
from env import EtsyEnvSandbox, EtsyEnvProduction

try:
from urlparse import parse_qsl
Expand All @@ -11,7 +11,7 @@ class EtsyV2(API):
api_version = 'v2'

def __init__(self, api_key='', key_file=None, method_cache=missing,
etsy_env=EtsyEnvSandbox(), log=None, etsy_oauth_client=None):
etsy_env=EtsyEnvSandbox, log=None, etsy_oauth_client=None):
self.api_url = etsy_env.api_url
self.etsy_oauth_client = None

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions etsy/oauth.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import oauth2 as oauth
import urllib
from cgi import parse_qsl
from etsy_env import EtsyEnvSandbox, EtsyEnvProduction
from env import EtsyEnvSandbox, EtsyEnvProduction

EtsyOAuthToken = oauth.Token

class EtsyOAuthClient(oauth.Client):
def __init__(self, oauth_consumer_key, oauth_consumer_secret, etsy_env=EtsyEnvSandbox(), token=None, logger=None):
def __init__(self, oauth_consumer_key, oauth_consumer_secret, etsy_env=EtsyEnvSandbox, token=None, logger=None):
consumer = oauth.Consumer(oauth_consumer_key, oauth_consumer_secret)
super(EtsyOAuthClient, self).__init__(consumer)
self.request_token_url = etsy_env.request_token_url
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
keywords = 'etsy api handmade',
packages = ['etsy'],
long_description = long_description,
test_suite = 'test',
test_suite = 'test.test_core',
install_requires=['simplejson >= 2.0'],
extras_require = {
'OAuth': ["oauth2>=1.2.0"],
Expand Down
2 changes: 1 addition & 1 deletion etsy/test_v2.py → test/test_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from etsy.oauth import EtsyOAuthClient

logging_enabled = True
etsy_env = EtsyEnvProduction()
etsy_env = EtsyEnvProduction

def my_log(msg):
if logging_enabled: print(msg)
Expand Down