def __init__(self, item_cls, data):
super(ResourceList, self).__init__()<EOL>if data is not None:<EOL><INDENT>data = json.loads(data) if type(data) is not dict else data<EOL>paging = data['<STR_LIT>']<EOL>raw_items = data.get(self.items_keys[item_cls.__name__])<EOL>if raw_items:<EOL><INDENT>for raw_item in raw_items:<EOL><INDENT>self.append(item_cls(raw_item))<EOL><DEDENT>self.page = paging['<STR_LIT>']<EOL>self.num_pages = paging['<STR_LIT>']<EOL>self.num_results = paging['<STR_LIT>']<EOL>self.page_size = paging['<STR_LIT>']<EOL><DEDENT><DEDENT>
Initialization of the list

        Args:
            item_cls (str): Object class matching the list items
            data (str or dict): A dictionary or raw JSON string that is returned by a request.