Skip to content
This repository was archived by the owner on May 14, 2020. It is now read-only.

Commit 323b946

Browse files
committed
First
0 parents  commit 323b946

20 files changed

+1121
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
site
2+
dist
3+
secret.json
4+
run_tests.py

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM python:3.7.3
2+
3+
ENV PYTHONUNBUFFERED 1
4+
ENV PYTHONDONTWRITEBYTECODE 0
5+
6+
RUN pip install --no-cache-dir coverage
7+
RUN pip install --no-cache-dir codecov
8+
COPY requirements.txt .
9+
RUN pip install --no-cache-dir -r requirements.txt
10+
11+
CMD ["bash"]

LICENSE.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (c) 2019 Andrii Matiiash
2+
3+
Permission is hereby granted, free of charge, to any person obtaining
4+
a copy of this software and associated documentation files (the
5+
"Software"), to deal in the Software without restriction, including
6+
without limitation the rights to use, copy, modify, merge, publish,
7+
distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to
9+
the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included
12+
in all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

MANIFEST

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# file GENERATED by distutils, do NOT edit
2+
setup.cfg
3+
setup.py
4+
browseapi\__init__.py
5+
browseapi\client.py
6+
browseapi\containers.py
7+
browseapi\exceptions.py

README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Browse API client
2+
3+
This package is a Python client for eBay Browse API.
4+
It is asynchronous and designed to send a large number of requests by
5+
one function call.
6+
7+
For more information about this API visit official [documentation](https://developer.ebay.com/api-docs/buy/browse/overview.html).
8+
9+
## Installation
10+
Install from PyPI by `pip install browseapi`
11+
12+
## Supported methods
13+
Only these methods are now implemented (names changed to lowercase notation):
14+
15+
* [search](https://developer.ebay.com/api-docs/buy/browse/resources/item_summary/methods/search)
16+
* [search_by_image](https://developer.ebay.com/api-docs/buy/browse/resources/search_by_image/methods/searchByImage)
17+
18+
## Quickstart
19+
Create a BrowseAPI instance with your application id (app_id)
20+
and application secret (cert_id) and start sending requests:
21+
22+
```python
23+
from browseapi import BrowseAPI
24+
25+
app_id = '<your_app_id>'
26+
cert_id = '<your_cert_id>'
27+
28+
api = BrowseAPI(app_id, cert_id)
29+
responses = api.execute('search', [{'q': 'drone', 'limit': 50}, {'category_ids': 20863}])
30+
31+
# this will make 'search' request two times with parameters
32+
# q=drone and limit=50 for the first time and
33+
# category_ids=20863 for the second time
34+
35+
print(responses[0].itemSummaries[0])
36+
```
37+
38+
All response fields have similar names and types as those mentioned
39+
in official docs.
40+
41+
## Tests
42+
For running tests put your `secret.json` file with fields `'eb_app_id'`
43+
and `'eb_cert_id'` to the `browseapi/tests` directory,
44+
then run a command from the parent browseapi directory:
45+
46+
`python -m unittest browseapi.tests.test_client`
47+
48+
## Requirements
49+
* Python >= 3.5.3
50+
* [aiohttp](https://aiohttp.readthedocs.io/en/stable/)
51+
52+
## Documentation
53+
54+
Documentation built with [mkdocs](https://www.mkdocs.org/).
55+
56+
link

browseapi/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .client import BrowseAPI

0 commit comments

Comments
 (0)