record = client.keyValueStore(store.getId()).getRecord("OUTPUT");
+ record.ifPresent(r -> System.out.println("KVS record bytes: " + r.getValue().length));
+} finally {
+ client.keyValueStore(store.getId()).delete();
+}
-// Request queue
+// Request queue: create, add a request, read the head.
RequestQueue queue = client.requestQueues().getOrCreate("example-rq");
-client.requestQueue(queue.getId()).addRequest(new RequestQueueRequest("https://example.com", "example"), false);
-RequestQueueHead head = client.requestQueue(queue.getId()).listHead(10L);
-System.out.println("Queue head items: " + head.getItems().size());
-
-// Named storages persist on your account; delete them when done so the example does not leak them.
-client.dataset(dataset.getId()).delete();
-client.keyValueStore(store.getId()).delete();
-client.requestQueue(queue.getId()).delete();
+try {
+ client.requestQueue(queue.getId()).addRequest(new RequestQueueRequest("https://example.com", "example"), false);
+ RequestQueueHead head = client.requestQueue(queue.getId()).listHead(10L);
+ System.out.println("Request queue head size: " + head.getItems().size());
+} finally {
+ client.requestQueue(queue.getId()).delete();
+}
```
## Get own account details
diff --git a/pom.xml b/pom.xml
index 1d08b2b..a1d1372 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
com.apify
apify-client
- 0.1.0
+ 0.1.1
jar
Apify Java Client
diff --git a/src/main/java/com/apify/client/LastRunOptions.java b/src/main/java/com/apify/client/LastRunOptions.java
index 08f3008..0a582c1 100644
--- a/src/main/java/com/apify/client/LastRunOptions.java
+++ b/src/main/java/com/apify/client/LastRunOptions.java
@@ -4,9 +4,10 @@
* Filters which "last" run the {@link ActorClient#lastRun}/{@link TaskClient#lastRun} accessors
* resolve to. Leave a field unset to leave that filter unset.
*
- * {@code origin} is an Apify-platform convenience exposed by the reference client but not
- * documented as a query parameter in the OpenAPI spec; it is included for parity, threaded to the
- * same {@code runs/last} endpoint.
+ *
{@code origin} is now a spec-declared query parameter on the {@code runs/last} endpoints
+ * (alongside {@code status}), matching the reference client's {@code lastRun({status, origin})}.
+ * The spec also declares {@code waitForFinish} on those endpoints, but the reference client does
+ * not expose it on {@code lastRun}, so neither do we.
*/
public final class LastRunOptions {
private String status;
diff --git a/src/main/java/com/apify/client/Version.java b/src/main/java/com/apify/client/Version.java
index 6b3cebf..c15e29d 100644
--- a/src/main/java/com/apify/client/Version.java
+++ b/src/main/java/com/apify/client/Version.java
@@ -13,13 +13,13 @@ public final class Version {
* The semantic version of this client library (see SemVer).
* Changes to the public interface other than additive ones are considered breaking changes.
*/
- public static final String CLIENT_VERSION = "0.1.0";
+ public static final String CLIENT_VERSION = "0.1.1";
/**
* The version of the Apify OpenAPI specification this client was generated and verified against.
* Corresponds to the {@code info.version} field of the Apify OpenAPI document.
*/
- public static final String API_SPEC_VERSION = "v2-2026-07-02T131926Z";
+ public static final String API_SPEC_VERSION = "v2-2026-07-07T132551Z";
private Version() {}
}