Skip to content

Commit 3a13ec1

Browse files
committed
[fern-generated] Update SDK
Generated by Fern CLI Version: unknown Generators: - fernapi/fern-java-sdk: 3.34.6
1 parent befee2c commit 3a13ec1

169 files changed

Lines changed: 13921 additions & 619 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.fern/metadata.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"cliVersion": "3.56.8",
2+
"cliVersion": "5.4.3",
33
"generatorName": "fernapi/fern-java-sdk",
44
"generatorVersion": "3.34.6",
55
"generatorConfig": {
@@ -12,5 +12,6 @@
1212
"package-layout": "flat",
1313
"use-local-date-for-dates": true
1414
},
15-
"sdkVersion": "0.1.4"
15+
"originGitCommit": "d43b488b595adb22c371e7454af5093ac0019371",
16+
"sdkVersion": "0.1.5"
1617
}

.fern/replay.lock

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.fernignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# Specify files that shouldn't be modified by Fern
2-
.github/workflows/ci.yml
2+
.github/workflows/ci.yml
3+
.fern/replay.lock
4+
.fern/replay.yml
5+
.gitattributes

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.fern/replay.lock linguist-generated=true

README.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The IcePanel Java library provides convenient access to the IcePanel APIs from J
1212
- [Getting Started](#getting-started)
1313
- [Environments](#environments)
1414
- [Base Url](#base-url)
15+
- [Pagination](#pagination)
1516
- [Exception Handling](#exception-handling)
1617
- [Advanced](#advanced)
1718
- [Custom Client](#custom-client)
@@ -41,7 +42,7 @@ Add the dependency in your `pom.xml` file:
4142
<dependency>
4243
<groupId>com.icepanel</groupId>
4344
<artifactId>sdk</artifactId>
44-
<version>0.1.4</version>
45+
<version>0.1.5</version>
4546
</dependency>
4647
```
4748

@@ -104,6 +105,46 @@ IcePanelClient client = IcePanelClient
104105
.build();
105106
```
106107

108+
## Pagination
109+
110+
Paginated requests will return an Iterable<T>, which can be used to loop through the underlying items, or stream them. You can also call
111+
`nextPage` to perform the pagination manually
112+
113+
```java
114+
import com.icepanel.IcePanelClient;
115+
import com.icepanel.core.SyncPagingIterable;
116+
import com.icepanel.types.ModelObjectExpanded;
117+
import java.util.List;
118+
119+
IcePanelClient client = IcePanelClient
120+
.builder()
121+
.build();
122+
123+
SyncPagingIterable<SyncPagingIterable<ModelObjectExpanded>> response = client.model().objects().list(...);
124+
125+
// Iterator
126+
for (item : response){
127+
// Do something with item
128+
}
129+
130+
// Streaming
131+
response.streamItems().map(item -> ...);
132+
133+
// Manual pagination
134+
for (
135+
List<SyncPagingIterable<ModelObjectExpanded>> items = response.getItems;
136+
response.hasNext();
137+
items = items.nextPage().getItems()) {
138+
// Do something with items
139+
}
140+
141+
// Access pagination metadata
142+
response.getResponse().ifPresent(r -> {
143+
String cursor = r.getNext();
144+
// Use cursor for stateless pagination
145+
});
146+
```
147+
107148
## Exception Handling
108149

109150
When the API returns a non-success status code (4xx or 5xx response), an API exception will be thrown.

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ java {
4747

4848
group = 'com.icepanel'
4949

50-
version = '0.1.4'
50+
version = '0.1.5'
5151

5252
jar {
5353
dependsOn(":generatePomFileForMavenPublication")
@@ -78,7 +78,7 @@ publishing {
7878
maven(MavenPublication) {
7979
groupId = 'com.icepanel'
8080
artifactId = 'sdk'
81-
version = '0.1.4'
81+
version = '0.1.5'
8282
from components.java
8383
pom {
8484
name = 'IcePanel <mail@icepanel.io>'

0 commit comments

Comments
 (0)