def _extract_folder(self, data): return serialize_folder( data['data'].get('name'), list_id=data['data'].get('key'), parent_id=data['data'].get('parentCollection'), id=data['data'].get('key') )
def root_folder(self): root = serialize_folder( 'All Documents', id='ROOT', parent_id='__' ) root['kind'] = 'folder' return root
def citation_lists(self, extract_folder): """List of CitationList objects, derived from Mendeley folders""" folders = self._get_folders() # TODO: Verify OAuth access to each folder all_documents = serialize_folder("All Documents", id="ROOT", parent_id="__") serialized_folders = [extract_folder(each) for each in folders] return [all_documents] + serialized_folders
def citation_lists(self, extract_folder): """List of CitationList objects, derived from Mendeley folders""" folders = self._get_folders() # TODO: Verify OAuth access to each folder all_documents = serialize_folder('All Documents', id='ROOT', parent_id='__') serialized_folders = [extract_folder(each) for each in folders] return [all_documents] + serialized_folders
def citation_lists(self, extract_folder): """List of CitationList objects, derived from Zotero collections""" client = self.client collections = client.collections() all_documents = serialize_folder('All Documents', id='ROOT', parent_id='__') serialized_folders = [extract_folder(each) for each in collections] return [all_documents] + serialized_folders
def citation_lists(self, extract_folder): """List of CitationList objects, derived from Zotero collections""" client = self.client # Note: Pagination is the only way to ensure all of the collections # are retrieved. 100 is the limit per request. This applies # to Mendeley too, though that limit is 500. collections = client.collections(limit=100) all_documents = serialize_folder('All Documents', id='ROOT', parent_id='__') serialized_folders = [extract_folder(each) for each in collections] return [all_documents] + serialized_folders
def citation_lists(self, extract_folder): """List of CitationList objects, derived from Zotero collections""" client = self.client collections = client.collections() all_documents = serialize_folder( 'All Documents', id='ROOT', parent_id='__' ) serialized_folders = [ extract_folder(each) for each in collections ] return [all_documents] + serialized_folders
def citation_lists(self, extract_folder): """List of CitationList objects, derived from Zotero collections""" client = self.client # Note: Pagination is the only way to ensure all of the collections # are retrieved. 100 is the limit per request. This applies # to Mendeley too, though that limit is 500. collections = client.collections(limit=100) all_documents = serialize_folder( 'All Documents', id='ROOT', parent_id='__' ) serialized_folders = [ extract_folder(each) for each in collections ] return [all_documents] + serialized_folders
def root_folder(self): root = serialize_folder('All Documents', id='ROOT', parent_id='__') root['kind'] = 'folder' return root
def root_folder(self): root = serialize_folder("All Documents", id="ROOT", parent_id="__") root["kind"] = "folder" return root