Skip to content
Merged
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
8 changes: 4 additions & 4 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"cliVersion": "5.45.3",
"cliVersion": "5.50.6",
"generatorName": "fernapi/fern-java-sdk",
"generatorVersion": "4.9.2",
"generatorVersion": "4.10.16",
"generatorConfig": {
"publish-to": "central",
"client-class-name": "CatchAllApi",
"package-prefix": "com.newscatcher.catchall"
},
"originGitCommit": "56ea60da11c1b8d90274a137f5fbc3bb89b9fac4",
"originGitCommit": "f9a7ba07dda24e9d9936bb543686bc542355479e",
"originGitCommitIsDirty": true,
"invokedBy": "ci",
"requestedVersion": "AUTO",
"ciProvider": "unknown",
"sdkVersion": "3.0.1"
"sdkVersion": "3.0.2"
}
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Add the dependency in your `build.gradle` file:

```groovy
dependencies {
implementation 'com.newscatcherapi:newscatcher-catchall-sdk:3.0.1'
implementation 'com.newscatcherapi:newscatcher-catchall-sdk:3.0.2'
}
```

Expand All @@ -47,7 +47,7 @@ Add the dependency in your `pom.xml` file:
<dependency>
<groupId>com.newscatcherapi</groupId>
<artifactId>newscatcher-catchall-sdk</artifactId>
<version>3.0.1</version>
<version>3.0.2</version>
</dependency>
```

Expand Down Expand Up @@ -264,3 +264,4 @@ On the other hand, contributions to the README are always very welcome!




4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ java {

group = 'com.newscatcherapi'

version = '3.0.1'
version = '3.0.2'

jar {
dependsOn(":generatePomFileForMavenPublication")
Expand Down Expand Up @@ -78,7 +78,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.newscatcherapi'
artifactId = 'newscatcher-catchall-sdk'
version = '3.0.1'
version = '3.0.2'
from components.java
pom {
name = 'newscatcher'
Expand Down
126 changes: 126 additions & 0 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,65 @@ client.jobs().getJobResults(
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.jobs.getJobResultsCsv(jobId) -> String</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into `event_associated_entities` and `mention_entities` JSON columns.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```java
client.jobs().getJobResultsCsv(
"job_id",
GetJobResultsCsvRequest
.builder()
.build()
);
```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**jobId:** `String` — Unique job identifier returned from [`POST /catchAll/submit`](https://www.newscatcherapi.com/docs/web-search-api/api-reference/jobs/create-job).

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>
Expand Down Expand Up @@ -981,6 +1040,65 @@ client.monitors().pullMonitorResults(
</dl>


</dd>
</dl>
</details>

<details><summary><code>client.monitors.pullMonitorResultsCsv(monitorId) -> String</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into `event_associated_entities` and `mention_entities` JSON columns.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```java
client.monitors().pullMonitorResultsCsv(
"monitor_id",
PullMonitorResultsCsvRequest
.builder()
.build()
);
```
</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**monitorId:** `String` — Monitor identifier.

</dd>
</dl>
</dd>
</dl>


</dd>
</dl>
</details>
Expand Down Expand Up @@ -2885,6 +3003,14 @@ client.entities().updateEntity(
<dl>
<dd>

**externalEntityId:** `Optional<String>` — Updated external identifier for this entity.

</dd>
</dl>

<dl>
<dd>

**additionalAttributes:** `Optional<AdditionalAttributes>`

</dd>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap<String, String>() {
{
put("User-Agent", "com.newscatcherapi:newscatcher-catchall-sdk/3.0.1");
put("User-Agent", "com.newscatcherapi:newscatcher-catchall-sdk/3.0.2");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.newscatcher.fern:api-sdk");
put("X-Fern-SDK-Version", "3.0.1");
put("X-Fern-SDK-Version", "3.0.2");
}
});
this.headerSuppliers = headerSuppliers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;
import java.time.temporal.TemporalAccessor;
import java.time.temporal.TemporalQueries;

Expand Down Expand Up @@ -42,8 +43,15 @@ public OffsetDateTime deserialize(JsonParser parser, DeserializationContext cont
if (token == JsonToken.VALUE_NUMBER_INT) {
return OffsetDateTime.ofInstant(Instant.ofEpochSecond(parser.getValueAsLong()), ZoneOffset.UTC);
} else {
TemporalAccessor temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest(
parser.getValueAsString(), OffsetDateTime::from, LocalDateTime::from);
String value = parser.getValueAsString();
TemporalAccessor temporal;
try {
temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest(value, OffsetDateTime::from, LocalDateTime::from);
} catch (DateTimeParseException e) {
// Fall back to space-separated format (e.g. "2025-02-15 10:30:00+00:00").
temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest(
value.replace(' ', 'T'), OffsetDateTime::from, LocalDateTime::from);
}

if (temporal.query(TemporalQueries.offset()) == null) {
return LocalDateTime.from(temporal).atOffset(ZoneOffset.UTC);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,21 @@ public final class UpdateEntityRequest {

private final Optional<String> description;

private final Optional<String> externalEntityId;

private final Optional<AdditionalAttributes> additionalAttributes;

private final Map<String, Object> additionalProperties;

private UpdateEntityRequest(
Optional<String> name,
Optional<String> description,
Optional<String> externalEntityId,
Optional<AdditionalAttributes> additionalAttributes,
Map<String, Object> additionalProperties) {
this.name = name;
this.description = description;
this.externalEntityId = externalEntityId;
this.additionalAttributes = additionalAttributes;
this.additionalProperties = additionalProperties;
}
Expand All @@ -56,6 +60,14 @@ public Optional<String> getDescription() {
return description;
}

/**
* @return Updated external identifier for this entity.
*/
@JsonProperty("external_entity_id")
public Optional<String> getExternalEntityId() {
return externalEntityId;
}

@JsonProperty("additional_attributes")
public Optional<AdditionalAttributes> getAdditionalAttributes() {
return additionalAttributes;
Expand All @@ -75,12 +87,13 @@ public Map<String, Object> getAdditionalProperties() {
private boolean equalTo(UpdateEntityRequest other) {
return name.equals(other.name)
&& description.equals(other.description)
&& externalEntityId.equals(other.externalEntityId)
&& additionalAttributes.equals(other.additionalAttributes);
}

@java.lang.Override
public int hashCode() {
return Objects.hash(this.name, this.description, this.additionalAttributes);
return Objects.hash(this.name, this.description, this.externalEntityId, this.additionalAttributes);
}

@java.lang.Override
Expand All @@ -98,6 +111,8 @@ public static final class Builder {

private Optional<String> description = Optional.empty();

private Optional<String> externalEntityId = Optional.empty();

private Optional<AdditionalAttributes> additionalAttributes = Optional.empty();

@JsonAnySetter
Expand All @@ -108,6 +123,7 @@ private Builder() {}
public Builder from(UpdateEntityRequest other) {
name(other.getName());
description(other.getDescription());
externalEntityId(other.getExternalEntityId());
additionalAttributes(other.getAdditionalAttributes());
return this;
}
Expand Down Expand Up @@ -140,6 +156,20 @@ public Builder description(String description) {
return this;
}

/**
* <p>Updated external identifier for this entity.</p>
*/
@JsonSetter(value = "external_entity_id", nulls = Nulls.SKIP)
public Builder externalEntityId(Optional<String> externalEntityId) {
this.externalEntityId = externalEntityId;
return this;
}

public Builder externalEntityId(String externalEntityId) {
this.externalEntityId = Optional.ofNullable(externalEntityId);
return this;
}

@JsonSetter(value = "additional_attributes", nulls = Nulls.SKIP)
public Builder additionalAttributes(Optional<AdditionalAttributes> additionalAttributes) {
this.additionalAttributes = additionalAttributes;
Expand All @@ -152,7 +182,8 @@ public Builder additionalAttributes(AdditionalAttributes additionalAttributes) {
}

public UpdateEntityRequest build() {
return new UpdateEntityRequest(name, description, additionalAttributes, additionalProperties);
return new UpdateEntityRequest(
name, description, externalEntityId, additionalAttributes, additionalProperties);
}

public Builder additionalProperty(String key, Object value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.newscatcher.catchall.core.RequestOptions;
import com.newscatcher.catchall.resources.jobs.requests.ContinueRequestDto;
import com.newscatcher.catchall.resources.jobs.requests.DeleteJobRequest;
import com.newscatcher.catchall.resources.jobs.requests.GetJobResultsCsvRequest;
import com.newscatcher.catchall.resources.jobs.requests.GetJobResultsRequest;
import com.newscatcher.catchall.resources.jobs.requests.GetJobStatusRequest;
import com.newscatcher.catchall.resources.jobs.requests.GetUserJobsRequest;
Expand Down Expand Up @@ -173,6 +174,35 @@ public CompletableFuture<PullJobResponseDto> getJobResults(
return this.rawClient.getJobResults(jobId, request, requestOptions).thenApply(response -> response.body());
}

/**
* Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into <code>event_associated_entities</code> and <code>mention_entities</code> JSON columns.
*/
public CompletableFuture<String> getJobResultsCsv(String jobId) {
return this.rawClient.getJobResultsCsv(jobId).thenApply(response -> response.body());
}

/**
* Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into <code>event_associated_entities</code> and <code>mention_entities</code> JSON columns.
*/
public CompletableFuture<String> getJobResultsCsv(String jobId, RequestOptions requestOptions) {
return this.rawClient.getJobResultsCsv(jobId, requestOptions).thenApply(response -> response.body());
}

/**
* Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into <code>event_associated_entities</code> and <code>mention_entities</code> JSON columns.
*/
public CompletableFuture<String> getJobResultsCsv(String jobId, GetJobResultsCsvRequest request) {
return this.rawClient.getJobResultsCsv(jobId, request).thenApply(response -> response.body());
}

/**
* Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into <code>event_associated_entities</code> and <code>mention_entities</code> JSON columns.
*/
public CompletableFuture<String> getJobResultsCsv(
String jobId, GetJobResultsCsvRequest request, RequestOptions requestOptions) {
return this.rawClient.getJobResultsCsv(jobId, request, requestOptions).thenApply(response -> response.body());
}

/**
* Continue an existing job to process more records beyond the initial limit.
*/
Expand Down
Loading
Loading