From d96eadbc53ea41e437975f5d6940d0e5cb211cc9 Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Tue, 20 Mar 2018 21:06:55 +0300 Subject: [PATCH 1/2] update meta-data for pypi --- .gitignore | 3 ++- setup.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 53afa79..20ba138 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ /*.egg-info /dist/ /venv/ -/.vscode/ \ No newline at end of file +/.vscode/ +/build/ \ No newline at end of file diff --git a/setup.py b/setup.py index 5bbe177..df158bf 100644 --- a/setup.py +++ b/setup.py @@ -15,13 +15,13 @@ def read(fname): setup( name='retailcrm', - version='5.0.0', + version='5.0.1', description='retailCRM API client', - long_description=read('README.md'), + long_description=read('README'), url='https://github.com/retailcrm/api-client-python', author='retailCRM', author_email='integration@retailcrm.ru', - keywords='crm, saas, rest, e-commerce', + keywords='crm saas rest e-commerce', license='MIT', packages=['retailcrm', 'tests'], package_data={}, From e233b97ed3254d7f17bdc5e57f8b3262308ca043 Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Tue, 20 Mar 2018 21:07:22 +0300 Subject: [PATCH 2/2] rst formatted README for pypi --- README | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 0000000..41ff9a3 --- /dev/null +++ b/README @@ -0,0 +1,79 @@ +retailCRM python API client +=========================== + +This is python retailCRM API client. This library allows to use all +available API versions. + +Install +------- + +:: + + pip install retailcrm + +Usage +----- + + +.. code:: python + + # coding utf-8 + + import retailcrm + + + client = retailcrm.v3('https://demo.retailcrm.ru', 'uLxXKBwjQteE9NkO3cJAqTXNwvKktaTc') + + order = { + 'firstName': 'John', + 'lastName': 'Doe', + 'phone': '+79000000000', + 'email': 'john@example.com', + 'orderMethod': 'call-request', + } + + result = client.order_create(order) + + +.. code:: python + + # coding utf-8 + + import retailcrm + + + client = retailcrm.v4('https://demo.retailcrm.ru', 'uLxXKBwjQteE9NkO3cJAqTXNwvKktaTc') + + result = client.customers_history(filter={'sinceId': '1500', 'startDate': '2018-03-01'}) + + print(result['pagination']['totalCount']) + + +.. code:: python + + # coding utf-8 + + import retailcrm + + + client = retailcrm.v5('https://demo.retailcrm.ru', 'uLxXKBwjQteE9NkO3cJAqTXNwvKktaTc') + site = 'example-com' + task = { + 'text': 'Product availability problem', + 'commentary': 'Take a look ASAP', + 'order': { + 'externalId': '100500' + }, + 'performerId': 1 + } + + result = client.task_create(task, site) + +Documentation +------------- + +- `English`_ +- `Russian`_ + +.. _English: http://www.retailcrm.pro/docs/Developers/Index +.. _Russian: http://www.retailcrm.ru/docs/Developers/Index \ No newline at end of file