unsupported operand type(s) for +=: 'dict' and 'dict'
liZe opened this issue · comments
The Search API provides a multi-page search, but returns dicts (and not lists), leading to an error. That's the only multi-page dict I've found in the API.
A quick fix would be to use something like that in request
:
body = response.json()
if isinstance(body, list):
result += body
elif isinstance(body, dict) and 'items' in body:
result['items'] += body['items']
Any better ideas?
LGTM. I would merge it if you make a PR.
@cenk Done!
Thank you. I have updated the version on PyPI: https://pypi.python.org/pypi/GitHub-Flask/3.1.2