If a user tries to access an endpoint they do not have access to the Python client throws an error along the lines of:
Traceback (most recent call last):
File "historics.py", line 15, in <module>
print(datasift.historics.status(start, end_time))
File "/Library/Python/2.7/site-packages/datasift/historics.py", line 102, in status
return self.request.get('status', params=params)
File "/Library/Python/2.7/site-packages/datasift/request.py", line 39, in get
return self.build_response(self('get', path, params=params, headers=headers), path=path)
File "/Library/Python/2.7/site-packages/datasift/request.py", line 84, in build_response
if int(response.headers.get("x-ratelimit-cost")) > int(response.headers.get("x-ratelimit-remaining")):
TypeError: int() argument must be a string or a number, not 'NoneType'
A new type of exception needs to be thrown when it sees '"error":"You do not have permission to access this endpoint"' as a response.
If a user tries to access an endpoint they do not have access to the Python client throws an error along the lines of:
A new type of exception needs to be thrown when it sees '"error":"You do not have permission to access this endpoint"' as a response.