diff --git a/instagram/bind.py b/instagram/bind.py index 85214e90..4e7eedc4 100644 --- a/instagram/bind.py +++ b/instagram/bind.py @@ -130,7 +130,7 @@ def _do_api_request(self, url, method="GET", body=None, headers=None): if content_obj.get('code') == 420 or content_obj.get('code') == 429: error_message = content_obj.get('error_message') or "Your client is making too many request per second" raise InstagramAPIError(content_obj.get('code'), "Rate limited", error_message) - raise InstagramAPIError(content_obj.has_key('code'), content_obj.has_key('error_type'), content_obj.has_key('error_message')) + raise InstagramAPIError(content_obj.get('code'), content_obj.get('error_type'), content_obj.get('error_message')) api_responses = [] status_code = content_obj['meta']['code'] diff --git a/instagram/client.py b/instagram/client.py index 2d67a673..ad479e27 100644 --- a/instagram/client.py +++ b/instagram/client.py @@ -224,12 +224,14 @@ def _make_subscription_action(method, include=None, exclude=None): accepts_parameters.extend(include) if exclude: accepts_parameters = [x for x in accepts_parameters if x not in exclude] + signature = False if method == 'GET' else True return bind_method( path="/subscriptions", method=method, accepts_parameters=accepts_parameters, include_secret=True, - objectify_response=False + objectify_response=False, + signature=signature, ) create_subscription = _make_subscription_action('POST')