From 6ad6a51f10489e5204899b75ef83759295609146 Mon Sep 17 00:00:00 2001 From: John Matherly Date: Mon, 3 Sep 2018 23:08:26 -0500 Subject: [PATCH] Release 1.10.1 Support PUT requests in the API helper method --- CHANGELOG.md | 4 ++++ setup.py | 2 +- shodan/helpers.py | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08caae4..8e84249 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ CHANGELOG ========= +1.10.1 +------ +* Support PUT requests in the API request helper method + 1.10.0 ------ * New command **shodan org**: manage enterprise access to Shodan for your team diff --git a/setup.py b/setup.py index a810b7a..5c96d32 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name = 'shodan', - version = '1.10.0', + version = '1.10.1', description = 'Python library and command-line utility for Shodan (https://developer.shodan.io)', long_description = README, long_description_content_type = 'text/x-rst', diff --git a/shodan/helpers.py b/shodan/helpers.py index 64e5937..ed1a88a 100644 --- a/shodan/helpers.py +++ b/shodan/helpers.py @@ -51,6 +51,8 @@ def api_request(key, function, params=None, data=None, base_url='https://api.sho proxies=proxies) elif method.lower() == 'delete': data = requests.delete(base_url + function, params=params, proxies=proxies) + elif method.lower() == 'put': + data = requests.put(base_url + function, params=params, proxies=proxies) else: data = requests.get(base_url + function, params=params, proxies=proxies)