Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct docstrings - warnings & errors #301

Open
wants to merge 47 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
c71ba56
add tests
timotheus Apr 6, 2017
059cdd8
remove debugging
timotheus Apr 6, 2017
047223d
Revert "remove debugging"
timotheus Apr 11, 2017
bf47d4c
Create ebay.yaml
timotheus Apr 13, 2017
d91e374
pep8 fixes and added tests
timotheus Apr 27, 2017
123d012
Added str conversion of siteid
MoorsTech May 12, 2017
9d27b8e
Merge pull request #198 from MoorsTech/master
timotheus May 15, 2017
86985e3
Fix on issue #189
codeastar Jul 27, 2017
8060a75
Python 3.x compatibility update
codeastar Jul 27, 2017
1bab59b
updated trading sample
acjohnson Sep 30, 2017
6bacf63
fix setup.py ascii issue
timotheus Oct 13, 2017
9d28f5e
Add an option for domain to sample/findings.py so it can work with sa…
mthaddon May 4, 2018
b357af5
add storeMeta code to sample code
timotheus Jun 7, 2018
3cfc2eb
Merge pull request #245 from mthaddon/master
timotheus Jun 20, 2018
ff19b45
Make compatible with python 3
w- Jun 26, 2018
7f97b94
don't pass dict to smart_encode_request_data
w- Jun 26, 2018
26a101a
Logic Errors on previous commit
w- Jun 26, 2018
eaf7911
Merge pull request #248 from w-/patch-1
timotheus Sep 3, 2018
b53ddd3
update tox to use pycodestyle instead of pep8
timotheus Sep 3, 2018
5c1db7a
Merge branch 'master' of https://github.com/timotheus/ebaysdk-python
timotheus Sep 3, 2018
011c96a
Merge pull request #217 from acjohnson/samplefix
timotheus Sep 4, 2018
c977cd8
Revert "Make compatible with python 3"
timotheus Sep 5, 2018
0f9016b
Merge pull request #255 from timotheus/revert-248-patch-1
timotheus Sep 5, 2018
7198ac7
fix socket warning
timotheus Sep 5, 2018
7dda80c
add test that includes more unicode
timotheus Sep 5, 2018
2646013
Merge pull request #205 from codeastar/python3_compatibility
timotheus Sep 7, 2018
c00d225
update finding test and clean up lint errors
timotheus Sep 11, 2018
fd3417a
added 'getmyebaysellingresponse.activelist.itemarray.item' to the Tra…
egdoc Dec 20, 2018
a94e885
Merge pull request #261 from egdoc/master
timotheus Apr 16, 2019
bd3ecf5
update samples with param: 'domain'
Jun 12, 2019
16e1ee1
Allow parallel support in python 3
dunnousername Jun 28, 2019
2c9e4f1
Merge pull request #1 from dunnousername/dunnousername-patch-1
dunnousername Jun 29, 2019
4325f48
Merge pull request #281 from dunnousername/master
timotheus Jul 11, 2019
8895794
Set Finding API to use https by default
johnsliao Aug 5, 2019
24cc741
Merge pull request #283 from johnsliao/master
timotheus Sep 5, 2019
5008665
Merge branch 'master' into master
gainskills Nov 13, 2019
8af8e84
update copyright
timotheus Nov 14, 2019
f119a6f
test commit w/ GPG
timotheus Nov 18, 2019
4ff94cb
test GPG commit
timotheus Nov 18, 2019
b6511d0
test GPG commit - without signing
timotheus Nov 19, 2019
c25e5cb
test commit with signing
timotheus Nov 19, 2019
1dd9af4
test GPG commit
timotheus Nov 19, 2019
16f3246
Merge pull request #279 from gainskills/master
timotheus Dec 5, 2019
ae7d2d3
fix tox and import issue
timotheus Dec 5, 2019
b8e9fb5
test commit with signing
timotheus Dec 6, 2019
ab739ac
revert GPG test commit
timotheus Dec 6, 2019
36fe7b4
docstrings: update warnings / errors docstring defaults
Apr 5, 2020
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
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
ebay.yaml
timebay.yaml
build/
dist/
Expand All @@ -10,5 +11,7 @@ ebaysdk.egg-info/
\.DS_Store
\.eggs
\.tox
venv/
venv*
.venv/
.venv*
\.virtualenvs

6 changes: 6 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
Changes for ebaysdk

2.1.6
- Update Copyright

2.1.5 Oct 13, 2017
- Bug fix release

2.1.4 Tue Aug 23 11:21:37 PDT 2016
- Merge PR from listingmirror for site-id fix
- Added a few performance tests
Expand Down
27 changes: 27 additions & 0 deletions ebay.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: ebay_api_config

# Trading API Sandbox - https://www.x.com/developers/ebay/products/trading-api
api.sandbox.ebay.com:
compatability: 719
appid: ENTER_YOUR_APPID_HERE
certid: ENTER_YOUR_CERTID_HERE
devid: ENTER_YOUR_DEVID_HERE
token: ENTER_YOUR_TOKEN_HERE

# Trading API - https://www.x.com/developers/ebay/products/trading-api
api.ebay.com:
compatability: 719
appid: ENTER_YOUR_APPID_HERE
certid: ENTER_YOUR_CERTID_HERE
devid: ENTER_YOUR_DEVID_HERE
token: ENTER_YOUR_TOKEN_HERE

# Finding API - https://www.x.com/developers/ebay/products/finding-api
svcs.ebay.com:
appid: ENTER_YOUR_APPID_HERE
version: 1.0.0

# Shopping API - https://www.x.com/developers/ebay/products/shopping-api
open.api.ebay.com:
appid: ENTER_YOUR_APPID_HERE
version: 671
6 changes: 3 additions & 3 deletions ebaysdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# -*- coding: utf-8 -*-

'''
© 2012-2013 eBay Software Foundation
Copyright 2012-2019 eBay Inc.
Authored by: Tim Keefer
Licensed under CDDL 1.0
'''

import platform
import logging

__version__ = '2.1.4'
Version = __version__ # for backware compatibility
__version__ = '2.1.5'
Version = __version__ # for backward compatibility

try:
from logging import NullHandler
Expand Down
4 changes: 1 addition & 3 deletions ebaysdk/config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

'''
© 2012-2013 eBay Software Foundation
Copyright 2012-2019 eBay Inc.
Authored by: Tim Keefer
Licensed under CDDL 1.0
'''
Expand All @@ -17,8 +17,6 @@ class Config(object):
"""Config Class for all APIs connections

>>> c = Config(domain='api.ebay.com')
>>> print(c.file())
ebay.yaml
>>> c.set('fname', 'tim')
>>> c.get('fname')
'tim'
Expand Down
5 changes: 3 additions & 2 deletions ebaysdk/connection.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

'''
© 2012-2013 eBay Software Foundation
Copyright 2012-2019 eBay Inc.
Authored by: Tim Keefer
Licensed under CDDL 1.0
'''
Expand Down Expand Up @@ -149,7 +149,7 @@ def build_request(self, verb, data, verb_attrs, files=None):
requestData = self.build_request_data(verb, data, verb_attrs)
if files:
del(headers['Content-Type'])
if isinstance(requestData, basestring): # pylint: disable-msg=E0602
if isinstance(requestData, str): # pylint: disable-msg=E0602
requestData = {'XMLPayload': requestData}

request = Request(self.method,
Expand Down Expand Up @@ -208,6 +208,7 @@ def process_response(self, parse_response=True):
datetime_nodes=self.datetime_nodes,
parse_response=parse_response)

self.session.close()
# set for backward compatibility
self._response_content = self.response.content

Expand Down
2 changes: 1 addition & 1 deletion ebaysdk/exception.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

'''
© 2012-2013 eBay Software Foundation
Copyright 2012-2019 eBay Inc.
Authored by: Tim Keefer
Licensed under CDDL 1.0
'''
Expand Down
12 changes: 7 additions & 5 deletions ebaysdk/finding/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

'''
© 2012-2013 eBay Software Foundation
Copyright 2012-2019 eBay Inc.
Authored by: Tim Keefer
Licensed under CDDL 1.0
'''
Expand All @@ -28,7 +28,7 @@ class Connection(BaseConnection):

Doctests:
>>> f = Connection(config_file=os.environ.get('EBAY_YAML'), debug=False)
>>> retval = f.execute('findItemsAdvanced', {'keywords': u'niño'})
>>> retval = f.execute('findItemsAdvanced', {'keywords': u'El Niño'})
>>> error = f.error()
>>> print(error)
None
Expand All @@ -50,12 +50,13 @@ def __init__(self, **kwargs):
domain -- API endpoint (default: svcs.ebay.com)
config_file -- YAML defaults (default: ebay.yaml)
debug -- debugging enabled (default: False)
warnings -- warnings enabled (default: False)
warnings -- warnings enabled (default: True)
errors -- errors enabled (default: True)
uri -- API endpoint uri (default: /services/search/FindingService/v1)
appid -- eBay application id
siteid -- eBay country site id (default: EBAY-US)
version -- version number (default: 1.0.0)
https -- execute of https (default: False)
https -- execute of https (default: True)
proxy_host -- proxy hostname
proxy_port -- proxy port number
timeout -- HTTP request timeout (default: 20)
Expand All @@ -73,7 +74,7 @@ def __init__(self, **kwargs):
# override yaml defaults with args sent to the constructor
self.config.set('domain', kwargs.get('domain', 'svcs.ebay.com'))
self.config.set('uri', '/services/search/FindingService/v1')
self.config.set('https', False)
self.config.set('https', True)
self.config.set('warnings', True)
self.config.set('errors', True)
self.config.set('siteid', 'EBAY-US')
Expand All @@ -99,6 +100,7 @@ def __init__(self, **kwargs):
'finditemsbykeywordsresponse.categoryhistogramcontainer.categoryhistogram',
'finditemsbyproductresponse.categoryhistogramcontainer.categoryhistogram',
'finditemsinebaystoresresponse.categoryhistogramcontainer.categoryhistogram',
'finditemsinebaystoresresponse.categoryhistogramcontainer.categoryhistogram.childcategoryhistogram',
'findcompleteditemsresponse.aspecthistogramcontainer.aspect',
'finditemsadvancedresponse.aspecthistogramcontainer.aspect',
'finditemsbycategoryresponse.aspecthistogramcontainer.aspect',
Expand Down
2 changes: 1 addition & 1 deletion ebaysdk/http/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

'''
© 2012-2013 eBay Software Foundation
Copyright 2012-2019 eBay Inc.
Authored by: Tim Keefer
Licensed under CDDL 1.0
'''
Expand Down
3 changes: 2 additions & 1 deletion ebaysdk/inventorymanagement/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ def __init__(self, **kwargs):
domain -- API endpoint (default: api.ebay.com)
config_file -- YAML defaults (default: ebay.yaml)
debug -- debugging enabled (default: False)
warnings -- warnings enabled (default: False)
warnings -- warnings enabled (default: True)
errors -- errors enabled (default: True)
uri -- API endpoint uri (default: /selling/inventory/v1)
token -- eBay application/user token
version -- version number (default: 1.0.0)
Expand Down
5 changes: 3 additions & 2 deletions ebaysdk/merchandising/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

'''
© 2012-2013 eBay Software Foundation
Copyright 2012-2019 eBay Inc.
Authored by: Tim Keefer
Licensed under CDDL 1.0
'''
Expand Down Expand Up @@ -40,7 +40,8 @@ def __init__(self, **kwargs):
domain -- API endpoint (default: open.api.ebay.com)
config_file -- YAML defaults (default: ebay.yaml)
debug -- debugging enabled (default: False)
warnings -- warnings enabled (default: False)
warnings -- warnings enabled (default: True)
errors -- errors enabled (default: True)
uri -- API endpoint uri (default: /MerchandisingService)
appid -- eBay application id
siteid -- eBay country site id (default: 0 (US))
Expand Down
10 changes: 5 additions & 5 deletions ebaysdk/parallel.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# -*- coding: utf-8 -*-

'''
© 2012-2013 eBay Software Foundation
Copyright 2012-2019 eBay Inc.
Authored by: Tim Keefer
Licensed under CDDL 1.0
'''
import sys
if sys.version_info[0] >= 3:
raise ImportError('grequests does not work with python3+')

import grequests
from ebaysdk.exception import ConnectionError

# pylint: disable=import-error
import grequests
# pylint: enable=import-error


class Parallel(object):
"""
Expand Down
5 changes: 3 additions & 2 deletions ebaysdk/policies/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

'''
© 2012-2013 eBay Software Foundation
Copyright 2012-2019 eBay Inc.
Authored by: Tim Keefer
Licensed under CDDL 1.0
'''
Expand Down Expand Up @@ -32,7 +32,8 @@ def __init__(self, **kwargs):
domain -- API endpoint (default: svcs.ebay.com)
config_file -- YAML defaults (default: ebay.yaml)
debug -- debugging enabled (default: False)
warnings -- warnings enabled (default: False)
warnings -- warnings enabled (default: True)
errors -- errors enabled (default: True)
uri -- API endpoint uri (default: /services/selling/v1/SellerProfilesManagementService)
appid -- eBay application id
siteid -- eBay country site id (default: EBAY-US)
Expand Down
2 changes: 1 addition & 1 deletion ebaysdk/poller/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
'''
© 2012-2015 eBay Software Foundation
Copyright 2012-2019 eBay Inc.
Authored by: Tim Keefer
Licensed under CDDL 1.0
'''
Expand Down
1 change: 1 addition & 0 deletions ebaysdk/poller/orders.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-

'''
Copyright 2012-2019 eBay Inc.
Authored by: Tim Keefer
Licensed under CDDL 1.0
'''
Expand Down
2 changes: 1 addition & 1 deletion ebaysdk/response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

'''
© 2012-2013 eBay Software Foundation
Copyright 2012-2019 eBay Inc.
Authored by: Tim Keefer
Licensed under CDDL 1.0
'''
Expand Down
4 changes: 2 additions & 2 deletions ebaysdk/shopping/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

'''
© 2012-2013 eBay Software Foundation
Copyright 2012-2019 eBay Inc.
Authored by: Tim Keefer
Licensed under CDDL 1.0
'''
Expand Down Expand Up @@ -46,7 +46,7 @@ def __init__(self, **kwargs):
uri -- API endpoint uri (default: /shopping)
appid -- eBay application id
siteid -- eBay country site id (default: 0 (US))
compatibility -- version number (default: 799)
version -- version number (default: 799)
https -- execute of https (default: True)
proxy_host -- proxy hostname
proxy_port -- proxy port number
Expand Down
20 changes: 1 addition & 19 deletions ebaysdk/soa/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

'''
© 2012-2013 eBay Software Foundation
Copyright 2012-2019 eBay Inc.
Authored by: Tim Keefer
Licensed under CDDL 1.0
'''
Expand Down Expand Up @@ -55,24 +55,6 @@ def load_from_app_config(self, app_config):
def response_dict(self):
return self.response.dict()

'''
if self._response_dict:
return self._response_dict

if self._response_content:

mydict = self.response.dict()

try:
verb = self.verb + 'Response'
self._response_dict = mydict['Envelope']['Body'][verb]

except KeyError:
self._response_dict = mydict.get(self.verb + 'Response', mydict)

return self._response_dict
'''

def build_request_headers(self, verb):
return {
'Content-Type': self.config.get('content_type'),
Expand Down
2 changes: 1 addition & 1 deletion ebaysdk/soa/finditem.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

'''
© 2012-2013 eBay Software Foundation
Copyright 2012-2019 eBay Inc.
Authored by: Tim Keefer
Licensed under CDDL 1.0
'''
Expand Down
10 changes: 6 additions & 4 deletions ebaysdk/trading/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

'''
© 2012-2013 eBay Software Foundation
Copyright 2012-2019 eBay Inc.
Authored by: Tim Keefer
Licensed under CDDL 1.0
'''
Expand Down Expand Up @@ -60,7 +60,8 @@ def __init__(self, **kwargs):
domain -- API endpoint (default: api.ebay.com)
config_file -- YAML defaults (default: ebay.yaml)
debug -- debugging enabled (default: False)
warnings -- warnings enabled (default: False)
warnings -- warnings enabled (default: True)
errors -- errors enabled (default: True)
uri -- API endpoint uri (default: /ws/api.dll)
appid -- eBay application id
devid -- eBay developer id
Expand Down Expand Up @@ -217,6 +218,7 @@ def __init__(self, **kwargs):
'getmembermessagesresponse.abstractrequest.outputselector',
'getmyebaybuyingresponse.abstractrequest.outputselector',
'getmyebaysellingresponse.abstractrequest.outputselector',
'getmyebaysellingresponse.activelist.itemarray.item',
'getmymessagesresponse.abstractrequest.outputselector',
'getnotificationpreferencesresponse.abstractrequest.outputselector',
'getordersresponse.abstractrequest.outputselector',
Expand Down Expand Up @@ -681,7 +683,7 @@ def build_request_headers(self, verb):
"X-EBAY-API-DEV-NAME": self.config.get('devid', ''),
"X-EBAY-API-APP-NAME": self.config.get('appid', ''),
"X-EBAY-API-CERT-NAME": self.config.get('certid', ''),
"X-EBAY-API-SITEID": self.config.get('siteid', ''),
"X-EBAY-API-SITEID": str(self.config.get('siteid', '')),
"X-EBAY-API-CALL-NAME": self.verb,
"Content-Type": "text/xml"
}
Expand Down Expand Up @@ -785,7 +787,7 @@ def _get_resp_body_errors(self):
.format(eClass=eClass, severity=eSeverity, code=eCode, shortMsg=eShortMsg,
longMsg=eLongMsg)

#from IPython import embed; embed()
# from IPython import embed; embed()

if eSeverity == 'Warning':
warnings.append(msg)
Expand Down
Loading