Changelog
Paged data retrieval enhancements, namely:
1) introduction of `ClientObjectCollection.get_all` method to retrieve all the items in a collection, regardless of the size, for example:
python
def print_progress(items):
"""
:type items: office365.sharepoint.listitems.collection.ListItemCollection
"""
print("Items read: {0}".format(len(items)))
page_size = 500
ctx = ClientContext(site_url).with_credentials(client_credentials)
large_list = ctx.web.lists.get_by_title(list_title)
all_items = target_list.items.get_all(page_size, print_progress).execute_query()
2) retrieving paged data via `ClientObjectCollection.paged` method
python
page_size = 500
ctx = ClientContext(site_url).with_credentials(client_credentials)
large_list = ctx.web.lists.get_by_title(list_title)
paged_items = large_list.items.paged(page_size, page_loaded=print_progress).get().execute_query()
for index, item in enumerate(paged_items): type: int, ListItem
print("{0}: {1}".format(index, item.id))
Bug fixes:
- 541: client certificate auth fails when non root site is provided
- 529: Python 2.7 compatibility fixes
- 527: fix for `Folder.copy_to_using_path` method