From e2bf692e6f6b1142d75ae1d34db0fb5bae0f6574 Mon Sep 17 00:00:00 2001 From: Arseniy Panfilov Date: Fri, 21 Apr 2017 02:56:27 +0300 Subject: [PATCH 1/6] allow passing params while making GET request to openx API --- ox3apiclient/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ox3apiclient/__init__.py b/ox3apiclient/__init__.py index 712a67c..ed74131 100644 --- a/ox3apiclient/__init__.py +++ b/ox3apiclient/__init__.py @@ -313,11 +313,11 @@ def _response_value(self, response): except ValueError: return response.content - def get(self, url): + def get(self, url, params=None): """Issue a GET request to the given URL or API shorthand """ - response = self._session.get(self._resolve_url(url), timeout=self.timeout) + response = self._session.get(self._resolve_url(url), params=params, timeout=self.timeout) self.log_request(response) response.raise_for_status() return self._response_value(response) From 231b14eb91fa32763db5676f5680c0e11dd37fbc Mon Sep 17 00:00:00 2001 From: Ravinder Atwal Date: Sun, 28 Jul 2019 20:01:52 -0700 Subject: [PATCH 2/6] Version up --- History.md | 7 ++++++- ox3apiclient/__init__.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index c0df417..b30c711 100644 --- a/History.md +++ b/History.md @@ -1,3 +1,8 @@ + +0.6.1 / 2019-07-23 +================= + * Add ODS endpoint to supported endpoint list + 0.6.0 / 2017-06-19 ================== * Added: Python 3 compatibility @@ -23,7 +28,7 @@ 0.3.1 / 2013-06-04 ================== * Removed: Realm Support - * Realm can still be given, but has no effect + * Realm can still be given, but has no effect * Fixed: Unicode encoding error in REST POSTing 0.3.0 / 2013-03-18 diff --git a/ox3apiclient/__init__.py b/ox3apiclient/__init__.py index 8a9b1ee..5f1349d 100644 --- a/ox3apiclient/__init__.py +++ b/ox3apiclient/__init__.py @@ -12,7 +12,7 @@ import requests from requests_oauthlib import OAuth1 -__version__ = '0.6.0' +__version__ = '0.6.1' REQUEST_TOKEN_URL = 'https://sso.openx.com/api/index/initiate' ACCESS_TOKEN_URL = 'https://sso.openx.com/api/index/token' From b9000065128d1fcf6583f0935a1b0cc52d0e7d9c Mon Sep 17 00:00:00 2001 From: Ravinder Atwal <47584663+openx-rj@users.noreply.github.com> Date: Tue, 27 Aug 2019 00:57:05 -0700 Subject: [PATCH 3/6] Making client recognize ODS request are JSON Keep version as 0.6.1, as we are yet to release 0.6.1 --- ox3apiclient/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ox3apiclient/__init__.py b/ox3apiclient/__init__.py index 64b2af4..0319ae7 100644 --- a/ox3apiclient/__init__.py +++ b/ox3apiclient/__init__.py @@ -22,7 +22,7 @@ API_PATH_SSO = '/api' ODS_PATH_V1 = '/data/1.0' ACCEPTABLE_PATHS = (API_PATH_V1, API_PATH_V2, API_PATH_SSO, ODS_PATH_V1) -JSON_PATHS = (API_PATH_V2,) +JSON_PATHS = (API_PATH_V2,ODS_PATH_V1) HTTP_METHOD_OVERRIDES = ['DELETE', 'PUT', 'OPTIONS'] From 5a1df0003060f06d1dbd168ac8ad27ecddfce419 Mon Sep 17 00:00:00 2001 From: Cezar Pokorski Date: Thu, 12 Sep 2019 09:51:40 +0200 Subject: [PATCH 4/6] We have to tell pypi that README is in markdown --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index aa2256d..ade1114 100755 --- a/setup.py +++ b/setup.py @@ -23,6 +23,7 @@ def read_file(name): platforms=['POSIX'], description='Client to connect to the OpenX Enterprise API.', long_description=read_file('README.md'), + long_description_content_type="text/markdown", packages=find_packages(), zip_safe=True, install_requires=['six','requests_oauthlib'], From 3de942eae0186d6ef0d66e0888b89ccffa7c34a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Morawiec?= <66949630+morawiec1@users.noreply.github.com> Date: Tue, 28 Sep 2021 11:22:40 +0200 Subject: [PATCH 5/6] Fix packages version (#48) * Fix packages version --- ox3apiclient/__init__.py | 2 +- requirements/dev.txt | 10 +++++----- setup.py | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ox3apiclient/__init__.py b/ox3apiclient/__init__.py index 0319ae7..207d31d 100644 --- a/ox3apiclient/__init__.py +++ b/ox3apiclient/__init__.py @@ -12,7 +12,7 @@ import requests from requests_oauthlib import OAuth1 -__version__ = '0.6.1' +__version__ = '0.6.2' REQUEST_TOKEN_URL = 'https://sso.openx.com/api/index/initiate' ACCESS_TOKEN_URL = 'https://sso.openx.com/api/index/token' diff --git a/requirements/dev.txt b/requirements/dev.txt index 81b9bca..e4af446 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,5 +1,5 @@ -mock -nose -requests -requests-oauthlib -six +mock==4.0.3 +nose==1.3.7 +requests==2.26.0 +requests-oauthlib==1.3.0 +six==1.16.0 diff --git a/setup.py b/setup.py index ade1114..5a2cc17 100755 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ def read_file(name): long_description_content_type="text/markdown", packages=find_packages(), zip_safe=True, - install_requires=['six','requests_oauthlib'], + install_requires=['six==2.26.0', 'requests_oauthlib==1.3.0'], classifiers=[ 'Environment :: Console', 'Environment :: Web Environment', @@ -44,7 +44,7 @@ def read_file(name): ], test_suite='nose.collector', tests_require=[ - 'nose', + 'nose==1.3.7', 'mock; python_version < "3.3"' ] ) From d80860c0f3f8efc7044951b364eaed6c1a89285a Mon Sep 17 00:00:00 2001 From: Michal Morawiec Date: Tue, 28 Sep 2021 12:55:31 +0200 Subject: [PATCH 6/6] Fix six nad mock version --- ox3apiclient/__init__.py | 2 +- setup.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ox3apiclient/__init__.py b/ox3apiclient/__init__.py index 207d31d..55eec8a 100644 --- a/ox3apiclient/__init__.py +++ b/ox3apiclient/__init__.py @@ -12,7 +12,7 @@ import requests from requests_oauthlib import OAuth1 -__version__ = '0.6.2' +__version__ = '0.6.3' REQUEST_TOKEN_URL = 'https://sso.openx.com/api/index/initiate' ACCESS_TOKEN_URL = 'https://sso.openx.com/api/index/token' diff --git a/setup.py b/setup.py index 5a2cc17..80b8a07 100755 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ def read_file(name): long_description_content_type="text/markdown", packages=find_packages(), zip_safe=True, - install_requires=['six==2.26.0', 'requests_oauthlib==1.3.0'], + install_requires=['six==1.16.0', 'requests_oauthlib==1.3.0'], classifiers=[ 'Environment :: Console', 'Environment :: Web Environment', @@ -45,6 +45,6 @@ def read_file(name): test_suite='nose.collector', tests_require=[ 'nose==1.3.7', - 'mock; python_version < "3.3"' + 'mock==2.0.0; python_version < "3.3"' ] )