BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etsy-python
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
etsy-python
Commits
a5cceb99
Commit
a5cceb99
authored
Jun 06, 2017
by
Tarun Bhardwaj
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/0.4.8'
parents
21dde768
b986374a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
7 deletions
+41
-7
__init__.py
etsy/__init__.py
+3
-3
_core.py
etsy/_core.py
+4
-0
request_oauth.py
etsy/request_oauth.py
+28
-0
setup.cfg
setup.cfg
+1
-1
setup.py
setup.py
+5
-3
No files found.
etsy/__init__.py
View file @
a5cceb99
...
@@ -2,8 +2,8 @@ from _v2 import EtsyV2 as Etsy # noqa
...
@@ -2,8 +2,8 @@ from _v2 import EtsyV2 as Etsy # noqa
from
etsy_env
import
EtsyEnvProduction
# noqa
from
etsy_env
import
EtsyEnvProduction
# noqa
__version__
=
'0.4.
7
'
__version__
=
'0.4.
8
'
__author__
=
'Dan McKinley & Fulfil.IO Inc.'
__author__
=
'Dan McKinley & Fulfil.IO Inc.'
__copyright__
=
'Copyright 2010
, Etsy Inc.
'
__copyright__
=
'Copyright 2010
Etsy Inc.; 2016-2017 Fulfil.IO Inc
'
__license__
=
'GPL v3'
__license__
=
'GPL v3'
__email__
=
'dan@etsy.com'
__email__
=
'dan@etsy.com
, support@fulfil.io
'
etsy/_core.py
View file @
a5cceb99
...
@@ -300,6 +300,10 @@ class API(object):
...
@@ -300,6 +300,10 @@ class API(object):
fields
.
append
((
name
,
str
(
value
)))
fields
.
append
((
name
,
str
(
value
)))
content_type
,
body
=
encode_multipart_formdata
(
fields
,
files
)
content_type
,
body
=
encode_multipart_formdata
(
fields
,
files
)
else
:
url
=
'
%
s
%
s'
%
(
self
.
api_url
,
url
)
body
=
urlencode
(
kwargs
)
content_type
=
'application/x-www-form-urlencoded'
self
.
last_url
=
url
self
.
last_url
=
url
data
=
self
.
_get_url
(
url
,
http_method
,
content_type
,
body
)
data
=
self
.
_get_url
(
url
,
http_method
,
content_type
,
body
)
...
...
etsy/request_oauth.py
0 → 100644
View file @
a5cceb99
from
etsy
import
EtsyEnvProduction
from
requests_oauthlib
import
OAuth1Session
class
EtsyOAuthClient
(
OAuth1Session
):
def
__init__
(
self
,
oauth_consumer_key
,
oauth_consumer_secret
,
etsy_env
=
EtsyEnvProduction
()):
super
(
EtsyOAuthClient
,
self
)
.
__init__
(
oauth_consumer_key
,
oauth_consumer_secret
)
self
.
request_token_url
=
etsy_env
.
request_token_url
self
.
access_token_url
=
etsy_env
.
access_token_url
self
.
signin_url
=
etsy_env
.
signin_url
def
get_signin_url
(
self
,
**
kwargs
):
self
.
fetch_request_token
(
self
.
request_token_url
)
return
self
.
authorization_url
(
self
.
signin_url
)
def
set_oauth_verifier
(
self
,
oauth_verifier
):
token
=
self
.
fetch_access_token
(
self
.
access_token_url
,
verifier
=
unicode
(
oauth_verifier
))
self
.
resource_owner_key
=
token
[
'oauth_token'
]
self
.
resource_owner_secret
=
token
[
'oauth_token_secret'
]
def
do_oauth_request
(
self
,
url
,
http_method
,
content_type
,
body
):
headers
=
{}
if
content_type
:
headers
=
{
'Content-Type'
:
content_type
}
return
self
.
request
(
http_method
,
url
,
headers
=
headers
,
data
=
body
)
.
text
setup.cfg
View file @
a5cceb99
[bumpversion]
[bumpversion]
current_version = 0.4.
7
current_version = 0.4.
8
commit = True
commit = True
tag = True
tag = True
...
...
setup.py
View file @
a5cceb99
...
@@ -7,8 +7,10 @@ long_description = open(os.path.join(this_dir, 'README.md'), 'r').read()
...
@@ -7,8 +7,10 @@ long_description = open(os.path.join(this_dir, 'README.md'), 'r').read()
requirements
=
[
requirements
=
[
'httplib2'
,
'httplib2'
,
'oauth2>=1.2.0'
,
'oauth2==1.9.0.post1'
,
'simplejson>=2.0'
,
'simplejson'
,
'requests'
,
'requests_oauthlib'
,
]
]
test_requirements
=
[
test_requirements
=
[
...
@@ -17,7 +19,7 @@ test_requirements = [
...
@@ -17,7 +19,7 @@ test_requirements = [
setup
(
setup
(
name
=
'pyetsy'
,
name
=
'pyetsy'
,
version
=
'0.4.
7
'
,
version
=
'0.4.
8
'
,
author
=
'Dan McKinley & Fulfil.IO Inc.'
,
author
=
'Dan McKinley & Fulfil.IO Inc.'
,
author_email
=
'dan@etsy.com,support@fulfil.io'
,
author_email
=
'dan@etsy.com,support@fulfil.io'
,
description
=
'Python access to the Etsy API'
,
description
=
'Python access to the Etsy API'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment