mirror of
https://github.com/retailcrm/api-client-python.git
synced 2024-11-28 07:56:04 +03:00
commit
857aba1f5c
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@
|
|||||||
/dist/
|
/dist/
|
||||||
/venv/
|
/venv/
|
||||||
/.vscode/
|
/.vscode/
|
||||||
|
/build/
|
79
README
Normal file
79
README
Normal file
@ -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
|
6
setup.py
6
setup.py
@ -15,13 +15,13 @@ def read(fname):
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='retailcrm',
|
name='retailcrm',
|
||||||
version='5.0.0',
|
version='5.0.1',
|
||||||
description='retailCRM API client',
|
description='retailCRM API client',
|
||||||
long_description=read('README.md'),
|
long_description=read('README'),
|
||||||
url='https://github.com/retailcrm/api-client-python',
|
url='https://github.com/retailcrm/api-client-python',
|
||||||
author='retailCRM',
|
author='retailCRM',
|
||||||
author_email='integration@retailcrm.ru',
|
author_email='integration@retailcrm.ru',
|
||||||
keywords='crm, saas, rest, e-commerce',
|
keywords='crm saas rest e-commerce',
|
||||||
license='MIT',
|
license='MIT',
|
||||||
packages=['retailcrm', 'tests'],
|
packages=['retailcrm', 'tests'],
|
||||||
package_data={},
|
package_data={},
|
||||||
|
Loading…
Reference in New Issue
Block a user