Skip to content

Commit 0a785c3

Browse files
authored
Merge pull request #8 from dataiku/release/1.0.2
Release/1.0.2
2 parents 3a0bb0d + 2337698 commit 0a785c3

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## [Version 1.0.2](https://github.com/dataiku/dss-plugin-api-connect/releases/tag/v1.0.2) - Bugfix release - 2021-05-25
4+
5+
- Fixed recipe ignoring the selected http_method
6+
37
## [Version 1.0.1](https://github.com/dataiku/dss-plugin-api-connect/releases/tag/v1.0.1) - Bugfix release - 2021-05-03
48

59
- Fixed the "Per page" pagination mode

plugin.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "api-connect",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"meta": {
55
"label": "API Connect",
66
"description": "Retrieve data from any REST API",

python-lib/rest_api_client.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -160,16 +160,11 @@ def request(self, method, url, can_raise_exeption=True, **kwargs):
160160
self.pagination.update_next_page(json_response)
161161
return json_response
162162

163-
def paginated_get(self, can_raise_exeption=True):
163+
def paginated_api_call(self, can_raise_exeption=True):
164164
pagination_params = self.pagination.get_params()
165165
params = self.requests_kwargs.get("params")
166166
params.update(pagination_params)
167167
self.requests_kwargs.update({"params": params})
168-
return self.get(self.pagination.get_next_page_url(), can_raise_exeption, **self.requests_kwargs)
169-
170-
def paginated_api_call(self, can_raise_exeption=True):
171-
if self.http_method == "GET":
172-
return self.paginated_get(can_raise_exeption=True)
173168
return self.request(self.http_method, self.pagination.get_next_page_url(), can_raise_exeption, **self.requests_kwargs)
174169

175170
@staticmethod

python-lib/rest_api_recipe_session.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def retrieve_next_page(self, is_raw_output):
5353
page_rows = []
5454
base_row = copy.deepcopy(self.initial_parameter_columns)
5555
logger.info("retrieve_next_page: Calling next page")
56-
json_response = self.client.paginated_get(can_raise_exeption=False)
56+
json_response = self.client.paginated_api_call(can_raise_exeption=False)
5757
if self.extraction_key:
5858
data_rows = json_response.get(self.extraction_key, [json_response])
5959
if data_rows is None:

0 commit comments

Comments
 (0)