Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"cliVersion": "3.5.0",
"cliVersion": "3.40.0",
"generatorName": "fernapi/fern-java-sdk",
"generatorVersion": "3.18.5",
"generatorVersion": "3.29.1",
"generatorConfig": {
"client-class-name": "Lattice",
"package-prefix": "com.anduril"
}
},
"sdkVersion": "5.1.0"
}
39 changes: 31 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Add the dependency in your `pom.xml` file:
<dependency>
<groupId>com.anduril</groupId>
<artifactId>lattice-sdk</artifactId>
<version>5.0.0</version>
<version>5.1.0</version>
</dependency>
```

Expand All @@ -72,10 +72,9 @@ import com.anduril.resources.entities.requests.EntityEventRequest;

public class Example {
public static void main(String[] args) {
Lattice client = Lattice
.builder()
.token("<token>")
.build();
Lattice client = Lattice.withCredentials("<clientId>", "<clientSecret>")
.build()
;

client.entities().longPollEntityEvents(
EntityEventRequest
Expand All @@ -86,6 +85,31 @@ public class Example {
}
}
```
## Authentication

This SDK supports two authentication methods:

### Option 1: Direct Bearer Token

If you already have a valid access token, you can use it directly:

```java
Lattice client = Lattice.builder()
.token("your-access-token")
.url("https://api.example.com")
.build();
```

### Option 2: OAuth Client Credentials

The SDK can automatically handle token acquisition and refresh:

```java
Lattice client = Lattice.builder()
.credentials("client-id", "client-secret")
.url("https://api.example.com")
.build();
```

## Environments

Expand Down Expand Up @@ -175,23 +199,22 @@ Lattice client = Lattice
### Timeouts

The SDK defaults to a 60 second timeout. You can configure this with a timeout option at the client or request level.

```java
import com.anduril.Lattice;
import com.anduril.core.RequestOptions;

// Client level
Lattice client = Lattice
.builder()
.timeout(10)
.timeout(60)
.build();

// Request level
client.entities().longPollEntityEvents(
...,
RequestOptions
.builder()
.timeout(10)
.timeout(60)
.build()
);
```
Expand Down
16 changes: 8 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ java {

group = 'com.anduril'

version = '5.0.0'
version = '5.1.0'

jar {
dependsOn(":generatePomFileForMavenPublication")
Expand Down Expand Up @@ -78,21 +78,21 @@ publishing {
maven(MavenPublication) {
groupId = 'com.anduril'
artifactId = 'lattice-sdk'
version = '5.0.0'
version = '5.1.0'
from components.java
pom {
name = 'Anduril Industries, Inc.'
description = 'Anduril Lattice SDK for Java'
url = 'https://developer.anduril.com'
name = 'anduril'
description = 'The official SDK of anduril'
url = 'https://buildwithfern.com'
licenses {
license {
name = 'Anduril Lattice Software Development Kit License Agreement'
name = 'Custom License (LICENSE)'
}
}
developers {
developer {
name = 'Anduril Industries, Inc.'
email = 'lattice-developers@anduril.com'
name = 'anduril'
email = 'developers@anduril.com'
}
}
scm {
Expand Down
Loading