Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get multi page data? #28

Closed
bbhxwl opened this issue Nov 18, 2020 · 5 comments
Closed

How to get multi page data? #28

bbhxwl opened this issue Nov 18, 2020 · 5 comments

Comments

@bbhxwl
Copy link

bbhxwl commented Nov 18, 2020

How to get multi page data?

await oneDrive.GetChildrenByPath("抖音");

This folder has 100000 data, but I can only get more than 100. How can I get the next page? If you use GetAllChildrenByPath, it will be very slow.

@bbhxwl
Copy link
Author

bbhxwl commented Nov 21, 2020

I have updated onedrive, which supports China Century Internet, but I will not use your page. Ask for advice.

@bbhxwl
Copy link
Author

bbhxwl commented Nov 21, 2020

image
This folder has 70000 files. There's no way to get it.

@bbhxwl
Copy link
Author

bbhxwl commented Nov 21, 2020

@KoenZomers

@KoenZomers
Copy link
Owner

Hi @bbhxwl. You're right, this wasn't possible yet unless you would go for retrieving all the results. I've added a method in the version I just released to deal with this and allow for retrieving the baches one by one yourself:

  • Added public virtual async Task<OneDriveItemCollection> GetNextChildrenByPath(string skipTokenUrl) which allows file requests from using i.e. public virtual async Task<OneDriveItemCollection> GetChildrenByPath(string path) on a large folder containing more than 100 files to retrieve the next batch of files. If your intend is to get all the results, use public virtual async Task<OneDriveItem[]> GetAllChildrenByPath(string path) instead. Issue 28

A sample of how to use it has been included in the Demo application. Here you can see how I pulled it off:

if (data.NextLink != null)

Let me know in case you have further questions.

@KoenZomers
Copy link
Owner

Closing it as no feedback received. Feel free to reopen in case it doesn't work for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants