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

Commit 87bc814

Browse files
committed
Merge branch 'dev'
2 parents e414088 + 09a9484 commit 87bc814

File tree

4 files changed

+82
-62
lines changed

4 files changed

+82
-62
lines changed

MANIFEST

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# file GENERATED by distutils, do NOT edit
2+
README.rst
23
setup.cfg
34
setup.py
45
browseapi\__init__.py

README.md

-58
This file was deleted.

README.rst

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
Browse API client
2+
=================
3+
4+
|coverage| |build_status| |Documentation Status| |PyPI version|
5+
6+
This package is a Python client for eBay Browse API. It is asynchronous
7+
and designed to send a large number of requests by one function call.
8+
9+
For more information about this API visit official
10+
`documentation <https://developer.ebay.com/api-docs/buy/browse/overview.html>`__.
11+
12+
Installation
13+
------------
14+
15+
Install from PyPI by ``pip install browseapi``
16+
17+
Supported methods
18+
-----------------
19+
20+
Only these methods are now implemented (names changed to lowercase
21+
notation):
22+
23+
- `search <https://developer.ebay.com/api-docs/buy/browse/resources/item_summary/methods/search>`__
24+
- `search\_by\_image <https://developer.ebay.com/api-docs/buy/browse/resources/search_by_image/methods/searchByImage>`__
25+
26+
Quickstart
27+
----------
28+
29+
Create a BrowseAPI instance with your application id (app\_id) and
30+
application secret (cert\_id) and start sending requests:
31+
32+
.. code:: python
33+
34+
from browseapi import BrowseAPI
35+
36+
app_id = '<your_app_id>'
37+
cert_id = '<your_cert_id>'
38+
39+
api = BrowseAPI(app_id, cert_id)
40+
responses = api.execute('search', [{'q': 'drone', 'limit': 50}, {'category_ids': 20863}])
41+
42+
# this will make 'search' request two times with parameters
43+
# q=drone and limit=50 for the first time and
44+
# category_ids=20863 for the second time
45+
46+
print(responses[0].itemSummaries[0])
47+
48+
All response fields have similar names and types as those mentioned in
49+
official docs.
50+
51+
Tests
52+
-----
53+
54+
For running tests put your ``secret.json`` file with fields
55+
``'eb_app_id'`` and ``'eb_cert_id'`` to the ``browseapi/tests``
56+
directory, then run a command from the parent browseapi directory:
57+
58+
``python -m unittest browseapi.tests.test_client``
59+
60+
Requirements
61+
------------
62+
63+
- Python >= 3.5.3
64+
- `aiohttp <https://aiohttp.readthedocs.io/en/stable/>`__
65+
66+
Documentation
67+
-------------
68+
69+
Documentation built with `mkdocs <https://www.mkdocs.org/>`__.
70+
71+
`browseapi.readthedocs.io <https://browseapi.readthedocs.io/en/latest/>`__
72+
73+
.. |coverage| image:: https://img.shields.io/codecov/c/github/AverHLV/browseapi.svg
74+
.. |build_status| image:: https://img.shields.io/gitlab/pipeline/AverHLV/browseapi/dev.svg
75+
.. |Documentation Status| image:: https://readthedocs.org/projects/browseapi/badge/?version=latest
76+
:target: https://browseapi.readthedocs.io/en/latest/?badge=latest
77+
.. |PyPI version| image:: https://badge.fury.io/py/browseapi.svg
78+
:target: https://badge.fury.io/py/browseapi

setup.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
from distutils.core import setup
22

3-
with open('README.md') as f:
3+
with open('README.rst') as f:
44
long_description = f.read()
55

66

77
setup(
88
name='browseapi',
99
packages=['browseapi'],
10-
version='0.10',
10+
version='0.11',
1111
license='MIT',
1212
description='eBay Browse API Python client',
1313
long_description=long_description,
14-
long_description_content_type='text/markdown',
1514
author='Andrii Matiiash',
1615
author_email='[email protected]',
1716
url='https://github.com/AverHLV/browseapi',
18-
download_url='https://github.com/AverHLV/browseapi/archive/0.10.tar.gz',
17+
download_url='https://github.com/AverHLV/browseapi/archive/0.11.tar.gz',
1918
keywords=['ASYNC', 'BROWSE API', 'CLIENT'],
2019

2120
install_requires=[

0 commit comments

Comments
 (0)