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

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .gradle/8.14.3/checksums/checksums.lock
Binary file not shown.
Binary file modified .gradle/8.14.3/checksums/md5-checksums.bin
Binary file not shown.
Binary file modified .gradle/8.14.3/checksums/sha1-checksums.bin
Binary file not shown.
Binary file modified .gradle/8.14.3/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified .gradle/8.14.3/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/8.14.3/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/8.14.3/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
2 changes: 1 addition & 1 deletion .gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Thu Jul 17 23:24:55 UTC 2025
#Fri Jul 18 18:33:27 UTC 2025
gradle.version=8.14.3
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Add the dependency in your `pom.xml` file:
<dependency>
<groupId>com.pipedream</groupId>
<artifactId>pipedream</artifactId>
<version>0.0.202</version>
<version>0.0.217</version>
</dependency>
```

Expand All @@ -36,12 +36,12 @@ Instantiate and use the client with the following:
```java
package com.example.usage;

import com.pipedream.api.PipedreamApiClient;
import com.pipedream.api.BaseClient;
import com.pipedream.api.resources.accounts.requests.CreateAccountRequest;

public class Example {
public static void main(String[] args) {
PipedreamApiClient client = PipedreamApiClient
BaseClient client = BaseClient
.builder()
.clientId("<clientId>")
.clientSecret("<clientSecret>")
Expand All @@ -52,6 +52,8 @@ public class Example {
CreateAccountRequest
.builder()
.appSlug("app_slug")
.cfmapJson("cfmap_json")
.connectToken("connect_token")
.build()
);
}
Expand All @@ -63,10 +65,10 @@ public class Example {
This SDK allows you to configure different environments for API requests.

```java
import com.pipedream.api.PipedreamApiClient;
import com.pipedream.api.BaseClient;
import com.pipedream.api.core.Environment;

PipedreamApiClient client = PipedreamApiClient
BaseClient client = BaseClient
.builder()
.environment(Environment.Prod)
.build();
Expand All @@ -77,9 +79,9 @@ PipedreamApiClient client = PipedreamApiClient
You can set a custom base URL when constructing the client.

```java
import com.pipedream.api.PipedreamApiClient;
import com.pipedream.api.BaseClient;

PipedreamApiClient client = PipedreamApiClient
BaseClient client = BaseClient
.builder()
.url("https://example.com")
.build();
Expand Down Expand Up @@ -107,12 +109,12 @@ This SDK is built to work with any instance of `OkHttpClient`. By default, if no
However, you can pass your own client like so:

```java
import com.pipedream.api.PipedreamApiClient;
import com.pipedream.api.BaseClient;
import okhttp3.OkHttpClient;

OkHttpClient customClient = ...;

PipedreamApiClient client = PipedreamApiClient
BaseClient client = BaseClient
.builder()
.httpClient(customClient)
.build();
Expand All @@ -133,9 +135,9 @@ A request is deemed retryable when any of the following HTTP status codes is ret
Use the `maxRetries` client option to configure this behavior.

```java
import com.pipedream.api.PipedreamApiClient;
import com.pipedream.api.BaseClient;

PipedreamApiClient client = PipedreamApiClient
BaseClient client = BaseClient
.builder()
.maxRetries(1)
.build();
Expand All @@ -146,11 +148,11 @@ PipedreamApiClient client = PipedreamApiClient
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.pipedream.api.PipedreamApiClient;
import com.pipedream.api.BaseClient;
import com.pipedream.api.core.RequestOptions;

// Client level
PipedreamApiClient client = PipedreamApiClient
BaseClient client = BaseClient
.builder()
.timeout(10)
.build();
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies {
api 'com.fasterxml.jackson.core:jackson-databind:2.17.2'
api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2'
api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2'
api 'org.apache.commons:commons-text:1.11.0'
api 'org.apache.commons:commons-text:1.13.1'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
}
Expand Down Expand Up @@ -47,7 +47,7 @@ java {

group = 'com.pipedream'

version = '0.0.202'
version = '0.0.217'

jar {
dependsOn(":generatePomFileForMavenPublication")
Expand Down Expand Up @@ -78,7 +78,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.pipedream'
artifactId = 'pipedream'
version = '0.0.202'
version = '0.0.217'
from components.java
pom {
name = 'pipedream'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import com.pipedream.api.resources.users.AsyncUsersClient;
import java.util.function.Supplier;

public class AsyncPipedreamApiClient {
public class AsyncBaseClient {
protected final ClientOptions clientOptions;

protected final Supplier<AsyncAppCategoriesClient> appCategoriesClient;
Expand All @@ -46,7 +46,7 @@ public class AsyncPipedreamApiClient {

protected final Supplier<AsyncOauthTokensClient> oauthTokensClient;

public AsyncPipedreamApiClient(ClientOptions clientOptions) {
public AsyncBaseClient(ClientOptions clientOptions) {
this.clientOptions = clientOptions;
this.appCategoriesClient = Suppliers.memoize(() -> new AsyncAppCategoriesClient(clientOptions));
this.appsClient = Suppliers.memoize(() -> new AsyncAppsClient(clientOptions));
Expand Down Expand Up @@ -110,7 +110,7 @@ public AsyncOauthTokensClient oauthTokens() {
return this.oauthTokensClient.get();
}

public static AsyncPipedreamApiClientBuilder builder() {
return new AsyncPipedreamApiClientBuilder();
public static AsyncBaseClientBuilder builder() {
return new AsyncBaseClientBuilder();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.pipedream.api.resources.oauthtokens.OauthTokensClient;
import okhttp3.OkHttpClient;

public final class AsyncPipedreamApiClientBuilder {
public final class AsyncBaseClientBuilder {
private ClientOptions.Builder clientOptionsBuilder = ClientOptions.builder();

private String clientId = System.getenv("PIPEDREAM_CLIENT_ID");
Expand All @@ -24,7 +24,7 @@ public final class AsyncPipedreamApiClientBuilder {
* Sets clientId.
* Defaults to the PIPEDREAM_CLIENT_ID environment variable.
*/
public AsyncPipedreamApiClientBuilder clientId(String clientId) {
public AsyncBaseClientBuilder clientId(String clientId) {
this.clientId = clientId;
return this;
}
Expand All @@ -33,59 +33,59 @@ public AsyncPipedreamApiClientBuilder clientId(String clientId) {
* Sets clientSecret.
* Defaults to the PIPEDREAM_CLIENT_SECRET environment variable.
*/
public AsyncPipedreamApiClientBuilder clientSecret(String clientSecret) {
public AsyncBaseClientBuilder clientSecret(String clientSecret) {
this.clientSecret = clientSecret;
return this;
}

/**
* Sets projectEnvironment
*/
public AsyncPipedreamApiClientBuilder projectEnvironment(String projectEnvironment) {
public AsyncBaseClientBuilder projectEnvironment(String projectEnvironment) {
this.projectEnvironment = projectEnvironment;
return this;
}

public AsyncPipedreamApiClientBuilder environment(Environment environment) {
public AsyncBaseClientBuilder environment(Environment environment) {
this.environment = environment;
return this;
}

public AsyncPipedreamApiClientBuilder url(String url) {
public AsyncBaseClientBuilder url(String url) {
this.environment = Environment.custom(url);
return this;
}

/**
* Sets the timeout (in seconds) for the client. Defaults to 60 seconds.
*/
public AsyncPipedreamApiClientBuilder timeout(int timeout) {
public AsyncBaseClientBuilder timeout(int timeout) {
this.clientOptionsBuilder.timeout(timeout);
return this;
}

/**
* Sets the maximum number of retries for the client. Defaults to 2 retries.
*/
public AsyncPipedreamApiClientBuilder maxRetries(int maxRetries) {
public AsyncBaseClientBuilder maxRetries(int maxRetries) {
this.clientOptionsBuilder.maxRetries(maxRetries);
return this;
}

/**
* Sets the underlying OkHttp client
*/
public AsyncPipedreamApiClientBuilder httpClient(OkHttpClient httpClient) {
public AsyncBaseClientBuilder httpClient(OkHttpClient httpClient) {
this.clientOptionsBuilder.httpClient(httpClient);
return this;
}

public AsyncPipedreamApiClientBuilder projectId(String projectId) {
public AsyncBaseClientBuilder projectId(String projectId) {
clientOptionsBuilder.projectId(projectId);
return this;
}

public AsyncPipedreamApiClient build() {
public AsyncBaseClient build() {
OauthTokensClient authClient = new OauthTokensClient(
ClientOptions.builder().environment(this.environment).build());
OAuthTokenSupplier oAuthTokenSupplier = new OAuthTokenSupplier(clientId, clientSecret, authClient);
Expand All @@ -94,6 +94,6 @@ public AsyncPipedreamApiClient build() {
this.clientOptionsBuilder.addHeader("x-pd-environment", this.projectEnvironment);
}
clientOptionsBuilder.environment(this.environment);
return new AsyncPipedreamApiClient(clientOptionsBuilder.build());
return new AsyncBaseClient(clientOptionsBuilder.build());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import com.pipedream.api.resources.users.UsersClient;
import java.util.function.Supplier;

public class PipedreamApiClient {
public class BaseClient {
protected final ClientOptions clientOptions;

protected final Supplier<AppCategoriesClient> appCategoriesClient;
Expand All @@ -46,7 +46,7 @@ public class PipedreamApiClient {

protected final Supplier<OauthTokensClient> oauthTokensClient;

public PipedreamApiClient(ClientOptions clientOptions) {
public BaseClient(ClientOptions clientOptions) {
this.clientOptions = clientOptions;
this.appCategoriesClient = Suppliers.memoize(() -> new AppCategoriesClient(clientOptions));
this.appsClient = Suppliers.memoize(() -> new AppsClient(clientOptions));
Expand Down Expand Up @@ -110,7 +110,7 @@ public OauthTokensClient oauthTokens() {
return this.oauthTokensClient.get();
}

public static PipedreamApiClientBuilder builder() {
return new PipedreamApiClientBuilder();
public static BaseClientBuilder builder() {
return new BaseClientBuilder();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.pipedream.api.resources.oauthtokens.OauthTokensClient;
import okhttp3.OkHttpClient;

public final class PipedreamApiClientBuilder {
public final class BaseClientBuilder {
private ClientOptions.Builder clientOptionsBuilder = ClientOptions.builder();

private String clientId = System.getenv("PIPEDREAM_CLIENT_ID");
Expand All @@ -24,7 +24,7 @@ public final class PipedreamApiClientBuilder {
* Sets clientId.
* Defaults to the PIPEDREAM_CLIENT_ID environment variable.
*/
public PipedreamApiClientBuilder clientId(String clientId) {
public BaseClientBuilder clientId(String clientId) {
this.clientId = clientId;
return this;
}
Expand All @@ -33,59 +33,59 @@ public PipedreamApiClientBuilder clientId(String clientId) {
* Sets clientSecret.
* Defaults to the PIPEDREAM_CLIENT_SECRET environment variable.
*/
public PipedreamApiClientBuilder clientSecret(String clientSecret) {
public BaseClientBuilder clientSecret(String clientSecret) {
this.clientSecret = clientSecret;
return this;
}

/**
* Sets projectEnvironment
*/
public PipedreamApiClientBuilder projectEnvironment(String projectEnvironment) {
public BaseClientBuilder projectEnvironment(String projectEnvironment) {
this.projectEnvironment = projectEnvironment;
return this;
}

public PipedreamApiClientBuilder environment(Environment environment) {
public BaseClientBuilder environment(Environment environment) {
this.environment = environment;
return this;
}

public PipedreamApiClientBuilder url(String url) {
public BaseClientBuilder url(String url) {
this.environment = Environment.custom(url);
return this;
}

/**
* Sets the timeout (in seconds) for the client. Defaults to 60 seconds.
*/
public PipedreamApiClientBuilder timeout(int timeout) {
public BaseClientBuilder timeout(int timeout) {
this.clientOptionsBuilder.timeout(timeout);
return this;
}

/**
* Sets the maximum number of retries for the client. Defaults to 2 retries.
*/
public PipedreamApiClientBuilder maxRetries(int maxRetries) {
public BaseClientBuilder maxRetries(int maxRetries) {
this.clientOptionsBuilder.maxRetries(maxRetries);
return this;
}

/**
* Sets the underlying OkHttp client
*/
public PipedreamApiClientBuilder httpClient(OkHttpClient httpClient) {
public BaseClientBuilder httpClient(OkHttpClient httpClient) {
this.clientOptionsBuilder.httpClient(httpClient);
return this;
}

public PipedreamApiClientBuilder projectId(String projectId) {
public BaseClientBuilder projectId(String projectId) {
clientOptionsBuilder.projectId(projectId);
return this;
}

public PipedreamApiClient build() {
public BaseClient build() {
OauthTokensClient authClient = new OauthTokensClient(
ClientOptions.builder().environment(this.environment).build());
OAuthTokenSupplier oAuthTokenSupplier = new OAuthTokenSupplier(clientId, clientSecret, authClient);
Expand All @@ -94,6 +94,6 @@ public PipedreamApiClient build() {
this.clientOptionsBuilder.addHeader("x-pd-environment", this.projectEnvironment);
}
clientOptionsBuilder.environment(this.environment);
return new PipedreamApiClient(clientOptionsBuilder.build());
return new BaseClient(clientOptionsBuilder.build());
}
}
Loading