def items(self, username, id, **kwargs): # Send request response = self.http.get('/users/%s/lists/%s/items' % (username, id), ) if response.status_code < 200 or response.status_code >= 300: return None # Parse response items = self.get_data(response, **kwargs) if type(items) is not list: return None return [ListItemMapper.process(self.client, item) for item in items]
def items(self, username, id, **kwargs): # Send request response = self.http.get( '/users/%s/lists/%s/items' % (clean_username(username), id), ) # Parse response items = self.get_data(response, **kwargs) if isinstance(items, requests.Response): return items if not items or type(items) is not list: return None return [ ListItemMapper.process(self.client, item, index=x + 1) for x, item in enumerate(items) ]
def items(self, username, id, **kwargs): # Send request response = self.http.get( '/users/%s/lists/%s/items' % (clean_username(username), id), ) if response.status_code < 200 or response.status_code >= 300: return None # Parse response items = self.get_data(response, **kwargs) if type(items) is not list: return None return [ ListItemMapper.process(self.client, item, index=x + 1) for x, item in enumerate(items) ]