KoenZomers / OneDriveAPI

API in .NET Framework 4.8.0, .NET Core 3.1 and .NET 6.0 to communicate with OneDrive Personal and OneDrive for Business
Eclipse Public License 1.0
110 stars 35 forks source link

How to get multi page data? #28

Closed bbhxwl closed 3 years ago

bbhxwl commented 3 years ago

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 commented 3 years ago

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

bbhxwl commented 3 years ago

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

bbhxwl commented 3 years ago

@KoenZomers

KoenZomers commented 3 years ago

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:

A sample of how to use it has been included in the Demo application. Here you can see how I pulled it off: https://github.com/KoenZomers/OneDriveAPI/blob/fe1c89dde9937f4e1b7251390edf0ba2fcf290eb/Demo/MainForm.cs#L272

Let me know in case you have further questions.

KoenZomers commented 3 years ago

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