Compare commits

..

No commits in common. "master" and "v5.1.2" have entirely different histories.

9 changed files with 18 additions and 16 deletions

View file

@ -18,9 +18,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: [3.5, 3.6, 3.7]
include:
- python-version: '3.12'
- python-version: '3.8'
coverage: 1
steps:
- uses: actions/checkout@v2
@ -51,13 +51,13 @@ jobs:
env:
COVERAGE: ${{ matrix.coverage }}
if: env.COVERAGE != 1
run: python -m unittest tests/*.py
run: nosetests -v
- name: Tests with coverage
env:
COVERAGE: ${{ matrix.coverage }}
if: env.COVERAGE == 1
run: |
coverage run -m unittest tests/*.py
nosetests -v --with-coverage --cover-xml
- name: Coverage
env:
COVERAGE: ${{ matrix.coverage }}

View file

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2015-2021 RetailDriver LLC
Copyright (c) 2015-2020 RetailDriver LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

2
README
View file

@ -9,7 +9,7 @@ Install
::
pip3 install retailcrm
pip install retailcrm
Usage
-----

View file

@ -12,7 +12,7 @@ This is Python RetailCRM API client. This library allows to use all available AP
## Install
```
pip3 install retailcrm
pip install retailcrm
```
## Usage
@ -48,7 +48,7 @@ import retailcrm
client = retailcrm.v4('https://demo.retailcrm.pro', 'uLxXKBwjQteE9NkO3cJAqTXNwvKktaTc')
result = client.customers_history(filters={'sinceId': '1500', 'startDate': '2018-03-01'})
result = client.customers_history(filter={'sinceId': '1500', 'startDate': '2018-03-01'})
print(result['pagination']['totalCount'])
```

View file

@ -1,6 +1,6 @@
multidimensional-urlencode==0.0.4
nose==1.3.7
requests==2.32.1
requests==2.21.0
coverage==4.5.4
pook==1.3.0
setuptools==70.0.0
pook==1.0.1
setuptools==43.0.0

View file

@ -15,7 +15,7 @@ def read(filename):
setup(
name='retailcrm',
version='5.1.2',
version='5.1.1',
description='RetailCRM API client',
long_description=read('README'),
url='https://github.com/retailcrm/api-client-python',
@ -34,11 +34,10 @@ setup(
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3 :: Only',
'Topic :: Software Development :: Libraries :: Python Modules',
]

View file

@ -168,6 +168,7 @@ class TestVersion3(unittest.TestCase):
"""
(pook.get(os.getenv('RETAILCRM_URL') + '/api/v3/statistic/update')
.headers({'X-API-KEY': None})
.reply(200)
.headers(self.__header)
.json({'errorMsg': '"apiKey" is missing.'})

View file

@ -164,6 +164,7 @@ class TestVersion4(unittest.TestCase):
"""
(pook.get(os.getenv('RETAILCRM_URL') + '/api/v4/statistic/update')
.headers({'X-API-KEY': None})
.reply(200)
.headers(self.__header)
.json({'errorMsg': '"apiKey" is missing.'})

View file

@ -245,6 +245,7 @@ class TestVersion5(unittest.TestCase):
"""
(pook.get(os.getenv('RETAILCRM_URL') + '/api/v5/statistic/update')
.headers({'X-API-KEY': None})
.reply(200)
.headers(self.__header)
.json({'errorMsg': '"apiKey" is missing.'})