def _retrieve_resources(self, url, class_, full):
objects_to_return = []<EOL>response = self.session.get(url)<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>result = response.json()<EOL>resources = result['<STR_LIT>']<EOL>objects_to_return.extend([class_(session=self.session, **resource)<EOL>for resource in resources])<EOL>while full and result['<STR_LIT>'] is not None:<EOL><INDENT>response = self.session.get(result['<STR_LIT>'])<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>result = response.json()<EOL>resources = result['<STR_LIT>']<EOL>objects_to_return.extend([class_(session=self.session,<EOL>**resource)<EOL>for resource in resources])<EOL><DEDENT>else:<EOL><INDENT>raise RuntimeError("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>.format(response.status_code, response.text))<EOL><DEDENT><DEDENT>return objects_to_return<EOL><DEDENT>else:<EOL><INDENT>raise RuntimeError("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>.format(response.status_code, response.text))<EOL><DEDENT>
Retrieve HTTP resources, return related objects (with pagination)