Skip to content

Commit 69dc86a

Browse files
Better README example (#30)
Update `README.md` with a better example endpoint Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
1 parent ee4b369 commit 69dc86a

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Instantiate and use the client with the following:
3737
package com.example.usage;
3838

3939
import com.pipedream.api.BaseClient;
40-
import com.pipedream.api.resources.accounts.requests.CreateAccountOpts;
40+
import com.pipedream.api.resources.actions.requests.RunActionOpts;
4141

4242
public class Example {
4343
public static void main(String[] args) {
@@ -47,13 +47,12 @@ public class Example {
4747
.clientSecret("<clientSecret>")
4848
.build();
4949

50-
client.accounts().create(
50+
client.actions().run(
5151
"project_id",
52-
CreateAccountOpts
52+
RunActionOpts
5353
.builder()
54-
.appSlug("app_slug")
55-
.cfmapJson("cfmap_json")
56-
.connectToken("connect_token")
54+
.id("id")
55+
.externalUserId("external_user_id")
5756
.build()
5857
);
5958
}
@@ -95,7 +94,7 @@ When the API returns a non-success status code (4xx or 5xx response), an API exc
9594
import com.pipedream.api.core.PipedreamApiApiException;
9695

9796
try {
98-
client.accounts().create(...);
97+
client.actions().run(...);
9998
} catch (PipedreamApiApiException e) {
10099
// Do something with the API exception...
101100
}
@@ -158,7 +157,7 @@ BaseClient client = BaseClient
158157
.build();
159158

160159
// Request level
161-
client.accounts().create(
160+
client.actions().run(
162161
...,
163162
RequestOptions
164163
.builder()

0 commit comments

Comments
 (0)