python-sdk
python-sdk copied to clipboard
AlchemyNewsDataV1 does not support pagination
Will currently throw the following error if you try to add the "next" query parameter to retrieve the next page.
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/watson_developer_cloud/alchemy_data_news_v1.py", line 39, in get_news_documents
return self._alchemy_html_request(method_url='/data/GetNews', method='GET', params=params)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/watson_developer_cloud/watson_developer_cloud_service.py", line 177, in _alchemy_html_request
accept_json=True)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/watson_developer_cloud/watson_developer_cloud_service.py", line 245, in request
raise WatsonException('Error: ' + error_message)
WatsonException: Error: Invalid field = 'next'
I've identified the bug in the code and will place a PR soon. Adding this issue for documentation/tracking purposes.
Fixed in 302c9b588610536ec99f6c6673799c3d68789cdb