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
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@

The Pipedream Java library provides convenient access to the Pipedream APIs from Java.

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [Environments](#environments)
- [Base Url](#base-url)
- [Exception Handling](#exception-handling)
- [Advanced](#advanced)
- [Custom Client](#custom-client)
- [Retries](#retries)
- [Timeouts](#timeouts)
- [Custom Headers](#custom-headers)
- [Contributing](#contributing)
- [Reference](#reference)

## Installation

### Gradle
Expand All @@ -25,7 +40,7 @@ Add the dependency in your `pom.xml` file:
<dependency>
<groupId>com.pipedream</groupId>
<artifactId>pipedream</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
</dependency>
```

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

group = 'com.pipedream'

version = '1.1.0'
version = '1.1.1'

jar {
dependsOn(":generatePomFileForMavenPublication")
Expand Down Expand Up @@ -80,7 +80,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.pipedream'
artifactId = 'pipedream'
version = '1.1.0'
version = '1.1.1'
from components.java
pom {
name = 'pipedream'
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/pipedream/api/core/ClientOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap<String, String>() {
{
put("User-Agent", "com.pipedream:pipedream/1.1.0");
put("User-Agent", "com.pipedream:pipedream/1.1.1");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.pipedream.fern:api-sdk");
put("X-Fern-SDK-Version", "1.1.0");
put("X-Fern-SDK-Version", "1.1.1");
}
});
this.headerSuppliers = headerSuppliers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ public CompletableFuture<BaseClientHttpResponse<SyncPagingIterable<Component>>>
if (request.getApp().isPresent()) {
QueryStringMapper.addQueryParameter(httpUrl, "app", request.getApp().get(), false);
}
if (request.getRegistry().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "registry", request.getRegistry().get(), false);
}
Request.Builder _requestBuilder = new Request.Builder()
.url(httpUrl.build())
.method("GET", null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ public BaseClientHttpResponse<SyncPagingIterable<Component>> list(
if (request.getApp().isPresent()) {
QueryStringMapper.addQueryParameter(httpUrl, "app", request.getApp().get(), false);
}
if (request.getRegistry().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "registry", request.getRegistry().get(), false);
}
Request.Builder _requestBuilder = new Request.Builder()
.url(httpUrl.build())
.method("GET", null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.fasterxml.jackson.annotation.Nulls;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.pipedream.api.core.ObjectMappers;
import com.pipedream.api.resources.actions.types.ActionsListRequestRegistry;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
Expand All @@ -30,6 +31,8 @@ public final class ActionsListRequest {

private final Optional<String> app;

private final Optional<ActionsListRequestRegistry> registry;

private final Map<String, Object> additionalProperties;

private ActionsListRequest(
Expand All @@ -38,12 +41,14 @@ private ActionsListRequest(
Optional<Integer> limit,
Optional<String> q,
Optional<String> app,
Optional<ActionsListRequestRegistry> registry,
Map<String, Object> additionalProperties) {
this.after = after;
this.before = before;
this.limit = limit;
this.q = q;
this.app = app;
this.registry = registry;
this.additionalProperties = additionalProperties;
}

Expand Down Expand Up @@ -87,6 +92,14 @@ public Optional<String> getApp() {
return app;
}

/**
* @return The registry to retrieve actions from. Defaults to 'all' ('public', 'private', or 'all')
*/
@JsonProperty("registry")
public Optional<ActionsListRequestRegistry> getRegistry() {
return registry;
}

@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
Expand All @@ -103,12 +116,13 @@ private boolean equalTo(ActionsListRequest other) {
&& before.equals(other.before)
&& limit.equals(other.limit)
&& q.equals(other.q)
&& app.equals(other.app);
&& app.equals(other.app)
&& registry.equals(other.registry);
}

@java.lang.Override
public int hashCode() {
return Objects.hash(this.after, this.before, this.limit, this.q, this.app);
return Objects.hash(this.after, this.before, this.limit, this.q, this.app, this.registry);
}

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

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

private Optional<ActionsListRequestRegistry> registry = Optional.empty();

@JsonAnySetter
private Map<String, Object> additionalProperties = new HashMap<>();

Expand All @@ -143,6 +159,7 @@ public Builder from(ActionsListRequest other) {
limit(other.getLimit());
q(other.getQ());
app(other.getApp());
registry(other.getRegistry());
return this;
}

Expand Down Expand Up @@ -216,8 +233,22 @@ public Builder app(String app) {
return this;
}

/**
* <p>The registry to retrieve actions from. Defaults to 'all' ('public', 'private', or 'all')</p>
*/
@JsonSetter(value = "registry", nulls = Nulls.SKIP)
public Builder registry(Optional<ActionsListRequestRegistry> registry) {
this.registry = registry;
return this;
}

public Builder registry(ActionsListRequestRegistry registry) {
this.registry = Optional.ofNullable(registry);
return this;
}

public ActionsListRequest build() {
return new ActionsListRequest(after, before, limit, q, app, additionalProperties);
return new ActionsListRequest(after, before, limit, q, app, registry, additionalProperties);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/
package com.pipedream.api.resources.actions.types;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

public final class ActionsListRequestRegistry {
public static final ActionsListRequestRegistry PRIVATE = new ActionsListRequestRegistry(Value.PRIVATE, "private");

public static final ActionsListRequestRegistry ALL = new ActionsListRequestRegistry(Value.ALL, "all");

public static final ActionsListRequestRegistry PUBLIC = new ActionsListRequestRegistry(Value.PUBLIC, "public");

private final Value value;

private final String string;

ActionsListRequestRegistry(Value value, String string) {
this.value = value;
this.string = string;
}

public Value getEnumValue() {
return value;
}

@java.lang.Override
@JsonValue
public String toString() {
return this.string;
}

@java.lang.Override
public boolean equals(Object other) {
return (this == other)
|| (other instanceof ActionsListRequestRegistry
&& this.string.equals(((ActionsListRequestRegistry) other).string));
}

@java.lang.Override
public int hashCode() {
return this.string.hashCode();
}

public <T> T visit(Visitor<T> visitor) {
switch (value) {
case PRIVATE:
return visitor.visitPrivate();
case ALL:
return visitor.visitAll();
case PUBLIC:
return visitor.visitPublic();
case UNKNOWN:
default:
return visitor.visitUnknown(string);
}
}

@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
public static ActionsListRequestRegistry valueOf(String value) {
switch (value) {
case "private":
return PRIVATE;
case "all":
return ALL;
case "public":
return PUBLIC;
default:
return new ActionsListRequestRegistry(Value.UNKNOWN, value);
}
}

public enum Value {
PUBLIC,

PRIVATE,

ALL,

UNKNOWN
}

public interface Visitor<T> {
T visitPublic();

T visitPrivate();

T visitAll();

T visitUnknown(String unknownType);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ public CompletableFuture<BaseClientHttpResponse<SyncPagingIterable<Component>>>
if (request.getApp().isPresent()) {
QueryStringMapper.addQueryParameter(httpUrl, "app", request.getApp().get(), false);
}
if (request.getRegistry().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "registry", request.getRegistry().get(), false);
}
if (request.getComponentType().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "component_type", request.getComponentType().get(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ public BaseClientHttpResponse<SyncPagingIterable<Component>> list(
if (request.getApp().isPresent()) {
QueryStringMapper.addQueryParameter(httpUrl, "app", request.getApp().get(), false);
}
if (request.getRegistry().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "registry", request.getRegistry().get(), false);
}
if (request.getComponentType().isPresent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "component_type", request.getComponentType().get(), false);
Expand Down
Loading
Loading