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 Cursor based pagination support for Keys and Translations APIs #52

Merged
merged 2 commits into from
May 20, 2024

Conversation

RonnyLV
Copy link
Collaborator

@RonnyLV RonnyLV commented May 16, 2024

Summary

Added new mode for paginated listing based on cursor on Keys and Translations endpoints.

Other Information

Refer to Pagination docs for more information

@RonnyLV RonnyLV requested a review from Dosexe May 16, 2024 09:20
pagination.go Show resolved Hide resolved
pagination.go Show resolved Hide resolved
The [List Keys](https://developers.lokalise.com/reference/list-all-keys) and [List Translations](https://developers.lokalise.com/reference/list-all-translations) endpoints support cursor pagination, which is recommended for its faster performance compared to traditional "offset" pagination. By default, "offset" pagination is used, so you must explicitly set `pagination` to `"cursor"` to use cursor pagination.

```go
// This approach is also applicable for `client.Translations()`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 You can add a link to client.Translations() here

@RonnyLV RonnyLV merged commit 234f28c into master May 20, 2024
8 checks passed
@RonnyLV RonnyLV deleted the feat/cursor_based_pagination branch May 20, 2024 12:17
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 this pull request may close these issues.

2 participants