File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
src/main/java/com/pipedream/api Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 22
33import com .pipedream .api .core .ClientOptions ;
44import com .pipedream .api .core .Environment ;
5- import java .util .Optional ;
5+ import com .pipedream .api .core .Suppliers ;
6+ import com .pipedream .api .resources .workflows .WorkflowsClient ;
67import org .immutables .value .Value ;
78
9+ import java .util .Optional ;
10+ import java .util .function .Supplier ;
11+
812@ Value
913public class AsyncPipedreamClient extends AsyncBaseClient {
14+ private final Supplier <WorkflowsClient > workflowsClient ;
15+
1016 public AsyncPipedreamClient (final ClientOptions clientOptions ) {
1117 super (clientOptions );
18+ this .workflowsClient = Suppliers .memoize (() -> new WorkflowsClient (clientOptions ));
1219 }
1320
1421 public static AsyncPipedreamClientBuilder builder () {
@@ -33,4 +40,8 @@ public Optional<String> rawAccessToken() {
3340 // or `Basic` prefix from the header value.
3441 return Optional .ofNullable (authorizationHeader ).map (h -> h .replaceFirst ("^.*?\\ s+" , "" ));
3542 }
43+
44+ public WorkflowsClient workflows () {
45+ return this .workflowsClient .get ();
46+ }
3647}
Original file line number Diff line number Diff line change 22
33import com .pipedream .api .core .ClientOptions ;
44import com .pipedream .api .core .Environment ;
5- import java .util .Optional ;
5+ import com .pipedream .api .core .Suppliers ;
6+ import com .pipedream .api .resources .workflows .WorkflowsClient ;
67import org .immutables .value .Value ;
78
9+ import java .util .Optional ;
10+ import java .util .function .Supplier ;
11+
812@ Value
913public class PipedreamClient extends BaseClient {
14+ private final Supplier <WorkflowsClient > workflowsClient ;
15+
1016 public PipedreamClient (final ClientOptions clientOptions ) {
1117 super (clientOptions );
18+ this .workflowsClient = Suppliers .memoize (() -> new WorkflowsClient (clientOptions ));
1219 }
1320
1421 public static PipedreamClientBuilder builder () {
@@ -33,4 +40,8 @@ public Optional<String> rawAccessToken() {
3340 // or `Basic` prefix from the header value.
3441 return Optional .ofNullable (authorizationHeader ).map (h -> h .replaceFirst ("^.*?\\ s+" , "" ));
3542 }
43+
44+ public WorkflowsClient workflows () {
45+ return this .workflowsClient .get ();
46+ }
3647}
You can’t perform that action at this time.
0 commit comments