Skip to content

Commit 857aba1

Browse files
authored
Merge pull request #6 from gwinn/master
Update package data for PyPi
2 parents f9a10e5 + e233b97 commit 857aba1

File tree

3 files changed

+84
-4
lines changed

3 files changed

+84
-4
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
/*.egg-info
55
/dist/
66
/venv/
7-
/.vscode/
7+
/.vscode/
8+
/build/

README

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
retailCRM python API client
2+
===========================
3+
4+
This is python retailCRM API client. This library allows to use all
5+
available API versions.
6+
7+
Install
8+
-------
9+
10+
::
11+
12+
pip install retailcrm
13+
14+
Usage
15+
-----
16+
17+
18+
.. code:: python
19+
20+
# coding utf-8
21+
22+
import retailcrm
23+
24+
25+
client = retailcrm.v3('https://demo.retailcrm.ru', 'uLxXKBwjQteE9NkO3cJAqTXNwvKktaTc')
26+
27+
order = {
28+
'firstName': 'John',
29+
'lastName': 'Doe',
30+
'phone': '+79000000000',
31+
'email': 'john@example.com',
32+
'orderMethod': 'call-request',
33+
}
34+
35+
result = client.order_create(order)
36+
37+
38+
.. code:: python
39+
40+
# coding utf-8
41+
42+
import retailcrm
43+
44+
45+
client = retailcrm.v4('https://demo.retailcrm.ru', 'uLxXKBwjQteE9NkO3cJAqTXNwvKktaTc')
46+
47+
result = client.customers_history(filter={'sinceId': '1500', 'startDate': '2018-03-01'})
48+
49+
print(result['pagination']['totalCount'])
50+
51+
52+
.. code:: python
53+
54+
# coding utf-8
55+
56+
import retailcrm
57+
58+
59+
client = retailcrm.v5('https://demo.retailcrm.ru', 'uLxXKBwjQteE9NkO3cJAqTXNwvKktaTc')
60+
site = 'example-com'
61+
task = {
62+
'text': 'Product availability problem',
63+
'commentary': 'Take a look ASAP',
64+
'order': {
65+
'externalId': '100500'
66+
},
67+
'performerId': 1
68+
}
69+
70+
result = client.task_create(task, site)
71+
72+
Documentation
73+
-------------
74+
75+
- `English`_
76+
- `Russian`_
77+
78+
.. _English: http://www.retailcrm.pro/docs/Developers/Index
79+
.. _Russian: http://www.retailcrm.ru/docs/Developers/Index

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ def read(fname):
1515

1616
setup(
1717
name='retailcrm',
18-
version='5.0.0',
18+
version='5.0.1',
1919
description='retailCRM API client',
20-
long_description=read('README.md'),
20+
long_description=read('README'),
2121
url='https://github.com/retailcrm/api-client-python',
2222
author='retailCRM',
2323
author_email='integration@retailcrm.ru',
24-
keywords='crm, saas, rest, e-commerce',
24+
keywords='crm saas rest e-commerce',
2525
license='MIT',
2626
packages=['retailcrm', 'tests'],
2727
package_data={},

0 commit comments

Comments
 (0)