def get_items(self, category=CATEGORY_EVENT, offset=REMO_DEFAULT_OFFSET):
more = True  <EOL>next_uri = None  <EOL>page = ReMoClient.FIRST_PAGE<EOL>page += int(offset / ReMoClient.ITEMS_PER_PAGE)<EOL>if category == CATEGORY_EVENT:<EOL><INDENT>api = self.api_events_url<EOL><DEDENT>elif category == CATEGORY_ACTIVITY:<EOL><INDENT>api = self.api_activities_url<EOL><DEDENT>elif category == CATEGORY_USER:<EOL><INDENT>api = self.api_users_url<EOL><DEDENT>else:<EOL><INDENT>raise ValueError(category + '<STR_LIT>')<EOL><DEDENT>while more:<EOL><INDENT>params = {<EOL>"<STR_LIT>": page,<EOL>"<STR_LIT>": "<STR_LIT>"<EOL>}<EOL>logger.debug("<STR_LIT>",<EOL>api, str(params))<EOL>raw_items = self.fetch(api, payload=params)<EOL>yield raw_items<EOL>items_data = json.loads(raw_items)<EOL>next_uri = items_data['<STR_LIT>']<EOL>if not next_uri:<EOL><INDENT>more = False<EOL><DEDENT>else:<EOL><INDENT>parsed_uri = urllib.parse.urlparse(next_uri)<EOL>parsed_params = urllib.parse.parse_qs(parsed_uri.query)<EOL>page = parsed_params['<STR_LIT>'][<NUM_LIT:0>]<EOL><DEDENT><DEDENT>
Retrieve all items for category using pagination