Compare commits

...

8 commits

Author SHA1 Message Date
Alex Lushpai
9429f1574c
update version matrix (#38)
* update python versions test matrix
* fix workflow file
* fix missing key tests
2024-05-24 22:19:21 +03:00
dependabot[bot]
f17fbc6801
--- (#37)
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 18:42:44 +03:00
dependabot[bot]
bd3998f823
Bump requests from 2.21.0 to 2.31.0 (#35)
Bumps [requests](https://github.com/psf/requests) from 2.21.0 to 2.31.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.21.0...v2.31.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-16 18:23:07 +03:00
Alex Lushpai
d0a558a8fe
Update python version (#34) 2024-01-16 18:04:27 +03:00
Alex Lushpai
1c36f3464b
Readme fix 2022-06-17 11:55:02 +03:00
Dmitriy
2c7061d8bf
Bug fix
client.customers_history (and all methods of client) doesn't has parameter filter. It has filters!
2022-04-20 23:17:44 +03:00
Alex Lushpai
3582b077f4
Merge pull request #29 from gwinn/master
minor bump
2021-09-08 16:29:11 +03:00
Alex Lushpai
bfdb4cc554 minor bump 2021-09-08 16:28:10 +03:00
9 changed files with 16 additions and 18 deletions

View file

@ -18,9 +18,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
python-version: [3.5, 3.6, 3.7] python-version: ['3.8', '3.9', '3.10', '3.11']
include: include:
- python-version: '3.8' - python-version: '3.12'
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: nosetests -v run: python -m unittest tests/*.py
- 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: |
nosetests -v --with-coverage --cover-xml coverage run -m unittest tests/*.py
- 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-2020 RetailDriver LLC Copyright (c) 2015-2021 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
:: ::
pip install retailcrm pip3 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
``` ```
pip install retailcrm pip3 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(filter={'sinceId': '1500', 'startDate': '2018-03-01'}) result = client.customers_history(filters={'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.21.0 requests==2.32.1
coverage==4.5.4 coverage==4.5.4
pook==1.0.1 pook==1.3.0
setuptools==43.0.0 setuptools==70.0.0

View file

@ -15,7 +15,7 @@ def read(filename):
setup( setup(
name='retailcrm', name='retailcrm',
version='5.1.1', version='5.1.2',
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,10 +34,11 @@ 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,7 +168,6 @@ 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,7 +164,6 @@ 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,7 +245,6 @@ 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.'})