-
Couldn't load subscription status.
- Fork 335
time zone & millisecond in ISO 8601 parsing #231
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
Open
tichkadzinga
wants to merge
9
commits into
timotheus:master
Choose a base branch
from
tichkadzinga:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c71ba56
add tests
timotheus 059cdd8
remove debugging
timotheus 047223d
Revert "remove debugging"
timotheus bf47d4c
Create ebay.yaml
timotheus d91e374
pep8 fixes and added tests
timotheus 123d012
Added str conversion of siteid
MoorsTech 9d27b8e
Merge pull request #198 from MoorsTech/master
timotheus 6bacf63
fix setup.py ascii issue
timotheus 4cf12be
time zone & millisecond in ISO 8601 parsing
tichkadzinga File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| ebay.yaml | ||
| timebay.yaml | ||
| build/ | ||
| dist/ | ||
|
|
@@ -12,3 +13,4 @@ ebaysdk.egg-info/ | |
| \.tox | ||
| venv/ | ||
| venv* | ||
| \.virtualenvs | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,58 +1 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| ''' | ||
| © 2012-2013 eBay Software Foundation | ||
| Authored by: Tim Keefer | ||
| Licensed under CDDL 1.0 | ||
| ''' | ||
|
|
||
| import sys | ||
| import unittest | ||
| import doctest | ||
| import ebaysdk.utils | ||
| import ebaysdk.config | ||
| import ebaysdk.response | ||
| import ebaysdk.connection | ||
| import ebaysdk.http | ||
| import ebaysdk.shopping | ||
| import ebaysdk.trading | ||
| import ebaysdk.merchandising | ||
| import ebaysdk.soa.finditem | ||
| import ebaysdk.finding | ||
| import ebaysdk.poller.orders | ||
| import ebaysdk.inventorymanagement | ||
|
|
||
| # does not pass with python3.3 | ||
| try: | ||
| import ebaysdk.parallel | ||
| except ImportError: | ||
| pass | ||
|
|
||
|
|
||
| def getTestSuite(): | ||
| suite = unittest.TestSuite() | ||
|
|
||
| suite.addTest(doctest.DocTestSuite(ebaysdk.poller.orders)) | ||
| suite.addTest(doctest.DocTestSuite(ebaysdk.utils)) | ||
| suite.addTest(doctest.DocTestSuite(ebaysdk.config)) | ||
| suite.addTest(doctest.DocTestSuite(ebaysdk.response)) | ||
| suite.addTest(doctest.DocTestSuite(ebaysdk.connection)) | ||
| # suite.addTest(doctest.DocTestSuite(ebaysdk.http)) | ||
| suite.addTest(doctest.DocTestSuite(ebaysdk.shopping)) | ||
| suite.addTest(doctest.DocTestSuite(ebaysdk.trading)) | ||
| suite.addTest(doctest.DocTestSuite(ebaysdk.merchandising)) | ||
| suite.addTest(doctest.DocTestSuite(ebaysdk.finding)) | ||
| suite.addTest(doctest.DocTestSuite(ebaysdk.inventorymanagement)) | ||
|
|
||
| if not sys.version_info[0] >= 3 \ | ||
| and sys.modules.has_key('grequests') is True: | ||
| # suite.addTest(doctest.DocTestSuite(ebaysdk.parallel)) | ||
| pass | ||
|
|
||
| # inside only | ||
| # suite.addTest(doctest.DocTestSuite(ebaysdk.soa.finditem)) | ||
|
|
||
| return suite | ||
|
|
||
| runner = unittest.TextTestRunner() | ||
| runner.run(getTestSuite()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| ''' | ||
| © 2012-2013 eBay Software Foundation | ||
| Authored by: Tim Keefer | ||
| Licensed under CDDL 1.0 | ||
| ''' | ||
|
|
||
| from __future__ import absolute_import | ||
| import os | ||
| import sys | ||
| import unittest | ||
| import doctest | ||
| import ebaysdk.utils | ||
| import ebaysdk.config | ||
| import ebaysdk.response | ||
| import ebaysdk.connection | ||
| import ebaysdk.http | ||
| import ebaysdk.shopping | ||
| import ebaysdk.trading | ||
| import ebaysdk.merchandising | ||
| import ebaysdk.soa.finditem | ||
| import ebaysdk.finding | ||
| import ebaysdk.poller.orders | ||
| import ebaysdk.inventorymanagement | ||
|
|
||
| # does not pass with python3.3 | ||
| try: | ||
| import ebaysdk.parallel | ||
| except ImportError: | ||
| pass | ||
|
|
||
| # os.environ.setdefault("EBAY_YAML", "ebay.yaml") | ||
|
|
||
|
|
||
| class TestBase(unittest.TestCase): | ||
|
|
||
| def doctest(self, module): | ||
| doctest.testmod(module, raise_on_error=True, verbose=False) | ||
|
|
||
| def test_run_doctest_poller(self): | ||
| self.doctest(ebaysdk.poller.orders) | ||
|
|
||
| def test_run_doctest_utils(self): | ||
| self.doctest(ebaysdk.utils) | ||
|
|
||
| def test_run_doctest_config(self): | ||
| self.doctest(ebaysdk.config) | ||
|
|
||
| def test_run_doctest_response(self): | ||
| self.doctest(ebaysdk.response) | ||
|
|
||
| def test_run_doctest_connection(self): | ||
| self.doctest(ebaysdk.connection) | ||
|
|
||
| def test_run_doctest_shopping(self): | ||
| s = ebaysdk.shopping.Connection(config_file=os.environ.get('EBAY_YAML')) | ||
| resp = s.execute('GetCategoryInfo', | ||
| {'CategoryID': '-1', | ||
| 'IncludeSelector': ['ChildCategories']}) | ||
| self.assertEqual(s.response.reply.Ack, 'Success') | ||
| self.assertEqual(s.error(), None) | ||
| #self.doctest(ebaysdk.shopping) | ||
|
|
||
| def test_run_doctest_trading(self): | ||
| self.doctest(ebaysdk.trading) | ||
|
|
||
| def test_run_doctest_merchandising(self): | ||
| self.doctest(ebaysdk.merchandising) | ||
|
|
||
| def test_run_doctest_finding(self): | ||
| self.doctest(ebaysdk.finding) | ||
|
|
||
| def test_run_doctest_inventorymanagement(self): | ||
| self.doctest(ebaysdk.inventorymanagement) | ||
|
|
||
| def test_grequests(self): | ||
| if not sys.version_info[0] >= 3 \ | ||
| and sys.modules.has_key('grequests') is True: | ||
|
|
||
| # self.doctest(ebaysdk.parallel) | ||
| pass | ||
|
|
||
| if __name__ == '__main__': | ||
| unittest.main() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| ''' | ||
| © 2012-2013 eBay Software Foundation | ||
| Authored by: Tim Keefer | ||
| Licensed under CDDL 1.0 | ||
| ''' | ||
|
|
||
| from __future__ import absolute_import | ||
| import os | ||
| import unittest | ||
| import ebaysdk.shopping | ||
| import lxml | ||
|
|
||
| os.environ.setdefault("EBAY_YAML", "ebay.yaml") | ||
|
|
||
| class TestErrors(unittest.TestCase): | ||
|
|
||
| def DISABLE_test_single_item(self): | ||
| connection = ebaysdk.shopping.Connection(version='799', config_file=os.environ.get('EBAY_YAML')) | ||
|
|
||
| for i in range(20): | ||
| connection.execute('GetSingleItem', { | ||
| 'ItemID': '262809803926', | ||
| 'version': '981', | ||
| 'IncludeSelector': ['Variations'] | ||
| }) | ||
| self.assertEqual(connection.response.status_code, 200) | ||
| self.assertEqual(type(connection.response.dom()), lxml.etree._Element) | ||
|
|
||
| if __name__ == '__main__': | ||
| unittest.main() | ||
|
|
||
| """ | ||
| <?xml version='1.0' encoding='utf-8'?><GetSingleItemRequest xmlns="urn:ebay:apis:eBLBaseComponents"><IncludeSelector>Variations</I | ||
| ncludeSelector><ItemID>262809803926</ItemID><version>981</version></GetSingleItemRequest> | ||
| 2017-02-28 06:18:42,156 ebaysdk [DEBUG]:total time=0.478377819061 | ||
| 2017-02-28 06:18:42,156 ebaysdk [DEBUG]:execute: verb=GetSingleItem data={'ItemID': '262809803926', 'version': 981, 'IncludeSelector': 'Variations'} | ||
| 2017-02-28 06:18:42,157 ebaysdk [DEBUG]:REQUEST (3ff5f071-04c3-40c0-a4f0-57f04a9e9972): POST http://open.api.ebay.com/shopping | ||
| 2017-02-28 06:18:42,157 ebaysdk [DEBUG]:headers={'Content-Length': '219', 'X-EBAY-API-REQUEST-ENCODING': 'XML', 'X-EBAY-API-VERSION': '799', 'User-Agent': 'eBaySDK/2.1.4 Pytho | ||
| n/2.7.6 Linux/3.13.0-91-generic', 'X-EBAY-SDK-REQUEST-ID': '3ff5f071-04c3-40c0-a4f0-57f04a9e9972', 'X-EBAY-API-SITE-ID': '0', 'X-EBAY-API-CALL-NAME': 'GetSingleItem', 'Content | ||
| -Type': 'text/xml', 'X-EBAY-API-APP-ID': 'LogoGrab-logograb-PRD-42f530923-a70f22b2'} | ||
| 2017-02-28 06:18:42,157 ebaysdk [DEBUG]:body=<?xml version='1.0' encoding='utf-8'?><GetSingleItemRequest xmlns="urn:ebay:apis:eBLBaseComponents"><IncludeSelector>Variations</I | ||
| ncludeSelector><ItemID>262809803926</ItemID><version>981</version></GetSingleItemRequest> | ||
| 2017-02-28 06:18:42,511 ebaysdk [DEBUG]:RESPONSE (3ff5f071-04c3-40c0-a4f0-57f04a9e9972): | ||
| 2017-02-28 06:18:42,511 ebaysdk [DEBUG]:elapsed time=0:00:00.354254 | ||
| 2017-02-28 06:18:42,511 ebaysdk [DEBUG]:status code=500 | ||
| 2017-02-28 06:18:42,511 ebaysdk [DEBUG]:headers={'breadcrumbid': 'ID-slc4b03c-6483-stratus-slc-ebay-com-53764-1487075486325-0-1105919761', 'content-length': '25', 'accept-enco | ||
| ding': 'identity', 'x-ebay-api-request-encoding': 'XML', 'x-ebay-api-version': '799', 'user-agent': 'eBaySDK/2.1.4 Python/2.7.6 Linux/3.13.0-91-generic', 'connection': 'keep-a | ||
| live', 'x-ebay-sdk-request-id': '3ff5f071-04c3-40c0-a4f0-57f04a9e9972', 'x-ebay-api-site-id': '0', 'x-ebay-api-call-name': 'GetSingleItem', 'content-type': 'text/plain;charset | ||
| =utf-8', 'x-forwarded-for': '52.19.146.95', 'x-ebay-api-app-id': 'LogoGrab-logograb-PRD-42f530923-a70f22b2'} | ||
| 2017-02-28 06:18:42,511 ebaysdk [DEBUG]:content=an internal error occured | ||
| 2017-02-28 06:18:42,512 ebaysdk [DEBUG]:response parse failed: Start tag expected, '<' not found, line 1, column 1 | ||
| ERROR - 2017-02-28 06:18:42,512 - utils.firehose_util - MainProcess - MainThread: Shopping Call error: {"ItemID": "262809803926", "version": 981, "IncludeSelector": "Variation | ||
| s"} | ||
| Traceback (most recent call last): | ||
| File "/home/ubuntu/logograb2-detection-server/utils/firehose_util.py", line 235, in make_ebay_request | ||
| r = Shopping(appid=app_id, config_file=None, debug=True).execute('GetSingleItem', api_pars) | ||
| File "/usr/local/lib/python2.7/dist-packages/ebaysdk/connection.py", line 124, in execute | ||
| self.error_check() | ||
| File "/usr/local/lib/python2.7/dist-packages/ebaysdk/connection.py", line 209, in error_check | ||
| estr = self.error() | ||
| File "/usr/local/lib/python2.7/dist-packages/ebaysdk/connection.py", line 321, in error | ||
| error_array.extend(self._get_resp_body_errors()) | ||
| File "/usr/local/lib/python2.7/dist-packages/ebaysdk/shopping/__init__.py", line 188, in _get_resp_body_errors | ||
| dom = self.response.dom() | ||
| File "/usr/local/lib/python2.7/dist-packages/ebaysdk/response.py", line 233, in dom | ||
| return self._dom | ||
| File "/usr/local/lib/python2.7/dist-packages/ebaysdk/response.py", line 220, in __getattr__ | ||
| return getattr(self._obj, name) | ||
| AttributeError: 'Response' object has no attribute '_dom' | ||
| """ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.