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

View file

@ -1,6 +1,6 @@
The MIT License (MIT) 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 Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal 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 Usage
----- -----

View file

@ -12,7 +12,7 @@ This is Python RetailCRM API client. This library allows to use all available AP
## Install ## Install
``` ```
pip3 install retailcrm pip install retailcrm
``` ```
## Usage ## Usage
@ -48,7 +48,7 @@ import retailcrm
client = retailcrm.v4('https://demo.retailcrm.pro', 'uLxXKBwjQteE9NkO3cJAqTXNwvKktaTc') 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']) print(result['pagination']['totalCount'])
``` ```

View file

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

View file

@ -15,7 +15,7 @@ def read(filename):
setup( setup(
name='retailcrm', name='retailcrm',
version='5.1.2', version='5.1.1',
description='RetailCRM API client', description='RetailCRM API client',
long_description=read('README'), long_description=read('README'),
url='https://github.com/retailcrm/api-client-python', url='https://github.com/retailcrm/api-client-python',
@ -34,11 +34,10 @@ setup(
'Operating System :: OS Independent', 'Operating System :: OS Independent',
'Programming Language :: Python', 'Programming Language :: Python',
'Programming Language :: Python :: 3', '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.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', 'Programming Language :: Python :: 3 :: Only',
'Topic :: Software Development :: Libraries :: Python Modules', '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') (pook.get(os.getenv('RETAILCRM_URL') + '/api/v3/statistic/update')
.headers({'X-API-KEY': None})
.reply(200) .reply(200)
.headers(self.__header) .headers(self.__header)
.json({'errorMsg': '"apiKey" is missing.'}) .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') (pook.get(os.getenv('RETAILCRM_URL') + '/api/v4/statistic/update')
.headers({'X-API-KEY': None})
.reply(200) .reply(200)
.headers(self.__header) .headers(self.__header)
.json({'errorMsg': '"apiKey" is missing.'}) .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') (pook.get(os.getenv('RETAILCRM_URL') + '/api/v5/statistic/update')
.headers({'X-API-KEY': None})
.reply(200) .reply(200)
.headers(self.__header) .headers(self.__header)
.json({'errorMsg': '"apiKey" is missing.'}) .json({'errorMsg': '"apiKey" is missing.'})