Skip to content

Commit be8641b

Browse files
committed
Release 0.2.0
1 parent cfd1cfa commit be8641b

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ publishing {
4747
maven(MavenPublication) {
4848
groupId = 'io.github.seamapi'
4949
artifactId = 'java'
50-
version = '0.1.26'
50+
version = '0.2.0'
5151
from components.java
5252
}
5353
}

src/main/java/com/seam/api/SeamBuilder.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ public SeamBuilder apiKey(String apiKey) {
1616
return this;
1717
}
1818

19+
public SeamBuilder seamWorkspace(String seamWorkspace) {
20+
this.clientOptionsBuilder.addHeader("Seam-Workspace", seamWorkspace);
21+
return this;
22+
}
23+
1924
public SeamBuilder environment(Environment environment) {
2025
this.environment = environment;
2126
return this;

src/main/java/com/seam/api/core/ClientOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ private ClientOptions(
2626
this.headers = new HashMap<>();
2727
this.headers.putAll(headers);
2828
this.headers.putAll(Map.of(
29-
"X-Fern-SDK-Name", "com.seam.fern:api-sdk", "X-Fern-SDK-Version", "0.1.26", "X-Fern-Language", "JAVA"));
29+
"X-Fern-SDK-Name", "com.seam.fern:api-sdk", "X-Fern-SDK-Version", "0.2.0", "X-Fern-Language", "JAVA"));
3030
this.headerSuppliers = headerSuppliers;
3131
this.httpClient = httpClient;
3232
;

src/main/java/com/seam/api/core/RequestOptions.java

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,21 @@
99
public final class RequestOptions {
1010
private final String apiKey;
1111

12-
private RequestOptions(String apiKey) {
12+
private final String seamWorkspace;
13+
14+
private RequestOptions(String apiKey, String seamWorkspace) {
1315
this.apiKey = apiKey;
16+
this.seamWorkspace = seamWorkspace;
1417
}
1518

1619
public Map<String, String> getHeaders() {
1720
Map<String, String> headers = new HashMap<>();
1821
if (this.apiKey != null) {
1922
headers.put("Authorization", "Bearer " + this.apiKey);
2023
}
24+
if (this.seamWorkspace != null) {
25+
headers.put("Seam-Workspace", this.seamWorkspace);
26+
}
2127
return headers;
2228
}
2329

@@ -28,13 +34,20 @@ public static Builder builder() {
2834
public static final class Builder {
2935
private String apiKey = null;
3036

37+
private String seamWorkspace = null;
38+
3139
public Builder apiKey(String apiKey) {
3240
this.apiKey = apiKey;
3341
return this;
3442
}
3543

44+
public Builder seamWorkspace(String seamWorkspace) {
45+
this.seamWorkspace = seamWorkspace;
46+
return this;
47+
}
48+
3649
public RequestOptions build() {
37-
return new RequestOptions(apiKey);
50+
return new RequestOptions(apiKey, seamWorkspace);
3851
}
3952
}
4053
}

0 commit comments

Comments
 (0)