Luca3317 / OpenLibrary.NET

C# library for OpenLibrary by the InternetArchive
MIT License
15 stars 4 forks source link

parameters needed for MyBooks.Get<Status> #19

Open bradyguyc opened 1 month ago

bradyguyc commented 1 month ago

The MyBooks set of api's appear to only return the first 100 entries with no apparent way of retrieving the subsequent items or increasing the limit.

In my branch, I added parameters to these api calls so I could increase the limit. At some point I will look into the ability to retrieve the 2nd page etc... of results, ie see if the openlibrary.org api supports that.

I can now call the api's like below by adding in support for parameters on those api's.

await pipeline.ExecuteAsync(async token => { currentlyReading = await OLClient.MyBooks.GetCurrentlyReadingAsync(OLClient.Username, new KeyValuePair<string, string>("limit", "500")); }, ct);

await pipeline.ExecuteAsync(async token => { alreadyRead = await OLClient.MyBooks.GetAlreadyReadAsync(OLClient.Username, new KeyValuePair<string, string>("limit", "500")); }, ct); await pipeline.ExecuteAsync(async token => { wantToRead = await OLClient.MyBooks.GetWantToReadAsync(OLClient.Username, new KeyValuePair<string, string>("limit", "500")); }, ct);

Luca3317 commented 1 month ago

That sounds right - feel free to open a pull request with your changes