From c244fd4f1314fcf103e841c21083758f61b51b57 Mon Sep 17 00:00:00 2001 From: phalt Date: Mon, 22 Dec 2014 23:01:42 +0000 Subject: [PATCH] 0.1.3 release --- HISTORY.rst | 8 +++++++- setup.py | 2 +- swapi/utils.py | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index a041d81..a14fab8 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -9,7 +9,13 @@ History * First release on PyPI. -0.1.2 (214-12-22) +0.1.2 (2014-12-22) ------------------ * Python 3.3 and Python 3.4 compatability + + +0.1.3 (2014-12-22) +------------------- + +* Add "swapi-python" to User-Agent to help with analytics diff --git a/setup.py b/setup.py index 984cfd2..72f6a39 100755 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ setup( name='swapi', - version='0.1.2', + version='0.1.3', description='A Python helper library for swapi.co - the Star Wars API', long_description=readme + '\n\n' + history, author='Paul Hallett', diff --git a/swapi/utils.py b/swapi/utils.py index 61a7d9d..03b0137 100644 --- a/swapi/utils.py +++ b/swapi/utils.py @@ -7,7 +7,8 @@ def query(query): - response = requests.get(query) + headers = {'User-Agent': 'swapi-python'} + response = requests.get(query, headers=headers) if response.status_code != 200: raise exceptions.ResourceDoesNotExist('Resource does not exist') return response