You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/additional_info/changelog.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,25 @@
1
1
# Changelog
2
2
3
+
## 9.1.0 (15-May-2024)
4
+
5
+
* Add support for [cursor pagination](https://lokalise.github.io/ruby-lokalise-api/api/getting-started#cursor-pagination) for List keys and List translation endpoints:
6
+
7
+
```ruby
8
+
cursor_pagination_params = {
9
+
pagination:'cursor',
10
+
cursor:'eyIxIjozMTk3ODIzNzJ9', # The starting cursor. Optional, string
11
+
limit:2# The number of items to fetch. Optional, default is 100
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.
144
+
145
+
```ruby
146
+
cursor_pagination_params = {
147
+
pagination:'cursor',
148
+
cursor:'eyIxIjozMTk3ODIzNzJ9', # The starting cursor. Optional, string
149
+
limit:2# The number of items to fetch. Optional, default is 100
# Request keys from the next cursor (returns `nil` if the next cursor is not available):
158
+
keys_next_cursor = keys.load_next_cursor
159
+
```
160
+
141
161
## Branching
142
162
143
163
If you are using [project branching feature](https://docs.lokalise.com/en/articles/3391861-project-branching), simply add branch name separated by semicolon to your project ID in any endpoint to access the branch. For example, in order to access `new-feature` branch for the project with an id `123abcdef.01`:
Copy file name to clipboardExpand all lines: docs/api/keys.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,13 @@
8
8
@client.keys(project_id, params = {}) # Input:
9
9
## project_id (string, required)
10
10
## params (hash)
11
-
### :page and :limit
11
+
### pagination and cursor-related params
12
12
# Output:
13
13
## Collection of keys available in the given project
14
14
```
15
15
16
+
**This endpoint also supports cursor pagination which is now a recommended approach, especially for fetching large amounts of data. Please [learn more in the Pagination docs](https://lokalise.github.io/ruby-lokalise-api/api/getting-started#cursor-pagination).**
Copy file name to clipboardExpand all lines: docs/api/translations.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,12 @@
9
9
## project_id (string, required)
10
10
## params (hash)
11
11
### Find full list in the docs
12
-
### :page and :limit
13
12
# Output:
14
13
## Collection of translations for the project
15
14
```
16
15
16
+
**This endpoint also supports cursor pagination which is now a recommended approach, especially for fetching large amounts of data. Please [learn more in the Pagination docs](https://lokalise.github.io/ruby-lokalise-api/api/getting-started#cursor-pagination).**
0 commit comments