ThomasPe / PixabaySharp

An unofficial C# / .NET API Wrapper
MIT License
6 stars 3 forks source link

Get More Than 20 Images? #5

Open GlennIM opened 5 years ago

GlennIM commented 5 years ago

I want to get more that 20 images if there are more (i.e. 40). Do I need to use the following code? What does 'Page' and 'PerPage' mean in the following code?

// more complex API queries for images var result = await client.QueryImagesAsync(new ImageQueryBuilder() { Query = "Dog", Page = 2, PerPage = 40 });

Thanks, Glenn

ThomasPe commented 5 years ago

PerPage is the amount of images you want to get (in your case 40), page = 0 means you'll get the first 40 images, page = 1 means image nr. 41 - 80 and so forth.

GlennIM commented 5 years ago

You mean Page = 1 will get the first 40, not 0, correct? Because Page = 0 returns null?

Does 'Page' mean the Pixabay page image count?

What happens if I try to get 40 images and there are less than 40 in Pixabay?

ThomasPe commented 5 years ago

I guess than it starts counting at 1, tbh I'm not currently using the API or this package myself. The api will probably return less than 40 in that case...