def get_data(self, url, type=GET, params=None):
if params is None:<EOL><INDENT>params = dict()<EOL><DEDENT>if type is GET:<EOL><INDENT>params.setdefault("<STR_LIT>", <NUM_LIT:200>)<EOL><DEDENT>req = self.__perform_request(url, type, params)<EOL>if req.status_code == <NUM_LIT>:<EOL><INDENT>return True<EOL><DEDENT>if req.status_code == <NUM_LIT>:<EOL><INDENT>raise NotFoundError()<EOL><DEDENT>try:<EOL><INDENT>data = req.json()<EOL><DEDENT>except ValueError as e:<EOL><INDENT>raise JSONReadError(<EOL>'<STR_LIT>' % str(e)<EOL>)<EOL><DEDENT>if not req.ok:<EOL><INDENT>msg = [data[m] for m in ("<STR_LIT:id>", "<STR_LIT:message>") if m in data][<NUM_LIT:1>]<EOL>raise DataReadError(msg)<EOL><DEDENT>self.__init_ratelimit(req.headers)<EOL>pages = data.get("<STR_LIT>", {}).get("<STR_LIT>", {})<EOL>if pages.get("<STR_LIT>") and "<STR_LIT>" not in params:<EOL><INDENT>return self.__deal_with_pagination(url, type, params, data)<EOL><DEDENT>else:<EOL><INDENT>return data<EOL><DEDENT>
This method is a basic implementation of __call_api that checks
errors too. In case of success the method will return True or the
content of the response to the request.

Pagination is automatically detected and handled accordingly