Skip to content

Commit

Permalink
commit updates for release 0.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
aschleg committed Jun 16, 2020
1 parent 5826efe commit 573fdb5
Show file tree
Hide file tree
Showing 6 changed files with 535 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,12 @@
# Version History

## Version 0.2.7

- Calling the `techport()` method without a project ID now returns data as expected. Thank you to user
[Burzlurker](https://github.com/Burzlurker) for pointing this out and providing a fix!
- Implemented a fix for when the `X-RateLimit-Remaining` header object was not available in the returned
API data and thus caused an error.

## Version 0.2.6

- `sentry` function now returns a summary object when `return_df=True` and a `des` or `spk` parameter are not specified.
Expand Down
8 changes: 8 additions & 0 deletions docs/source/versions.rst
Expand Up @@ -4,6 +4,14 @@
Version History
===============

Version 0.2.7
-------------

- Calling the :code:`techport()` method without a project ID now returns data as expected. Thank you to
user `Burzlurker <https://github.com/Burzlurker>`_ for pointing this out and providing a fix!
- Implemented a fix for when the :code:`X-RateLimit-Remaining` header object was not available in the returned
API data and thus caused an error.

Version 0.2.6
-------------

Expand Down
7 changes: 5 additions & 2 deletions nasapy/api.py
Expand Up @@ -1467,7 +1467,7 @@ def techport(self, project_id=None, last_updated=None, return_format='json'):
params={'updatedSince': last_updated,
'api_key': self.__api_key})
else:
url = url + '{project_id}'.format(project_id=project_id)
url = url + '/{project_id}'.format(project_id=project_id)

if return_format == 'xml':
url = url + '.xml'
Expand Down Expand Up @@ -2907,7 +2907,10 @@ def _donki_request(key, url, start_date=None, end_date=None):
'endDate': end_date
})

limit_remaining = r.headers['X-RateLimit-Remaining']
if 'X-RateLimit-Remaining' not in r.headers:
limit_remaining = 'n/a'
else:
limit_remaining = r.headers['X-RateLimit-Remaining']

if r.status_code != 200:
raise requests.exceptions.HTTPError(r.reason, r.url)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -4,7 +4,7 @@

setup(
name='nasapy',
version='0.2.6',
version='0.2.7',
author='Aaron Schlegel',
author_email='aaron@aaronschlegel.me',
description='Python wrapper for the NASA API',
Expand Down

0 comments on commit 573fdb5

Please sign in to comment.