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

Add pagination to ListObjects() #36

Open
TopperDEL opened this issue Nov 22, 2023 · 0 comments · May be fixed by #41
Open

Add pagination to ListObjects() #36

TopperDEL opened this issue Nov 22, 2023 · 0 comments · May be fixed by #41

Comments

@TopperDEL
Copy link
Owner

The current implementation loads all objects. It fetches 1000 per page but does not stop at one page. This might not always be the best as it makes ListObjects slower and produces higher traffic.

It would be better to add an overload that takes a "Cursor"-value and a max entries parameter.

TopperDEL added a commit that referenced this issue Oct 28, 2024
Fixes #36

Add pagination support to ListObjects() method.

* Add a new overload for `ListObjectsAsync` in `IObjectService` interface to take a 'Cursor'-value and a max entries parameter.
* Update `ListObjectsOptions` class to include a `MaxEntries` property and update the `ToSWIG` method to include this property.
* Implement the new overload for `ListObjectsAsync` in `ObjectService` class to handle the 'Cursor'-value and max entries parameter.
* Update `BucketContentViewModel` class to use the new overload of `ListObjectsAsync` with 'Cursor'-value and max entries parameter.
* Add a new test method in `ObjectServiceTest` to verify the new overload of `ListObjectsAsync` with 'Cursor'-value and max entries parameter.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/TopperDEL/uplink.net/issues/36?shareId=XXXX-XXXX-XXXX-XXXX).
@TopperDEL TopperDEL linked a pull request Oct 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant