Skip to content

Commit ab20ab0

Browse files
Better README example (#50)
* Update `README.md` with a better example endpoint * Exclude workflow files from Fern --------- Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Jay Vercellone <jay@pipedream.com>
1 parent 1565982 commit ab20ab0

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

.fernignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ src/pipedream/pipedream.py
2020
src/pipedream/proxy/client.py
2121

2222
# Custom Workflow files
23-
src/pipedream/workflows/**/*
23+
src/pipedream/workflows/__init__.py
24+
src/pipedream/workflows/client.py

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,9 @@ client = Pipedream(
2828
client_id="YOUR_CLIENT_ID",
2929
client_secret="YOUR_CLIENT_SECRET",
3030
)
31-
client.accounts.create(
32-
app_slug="app_slug",
33-
cfmap_json="cfmap_json",
34-
connect_token="connect_token",
31+
client.actions.run(
32+
id="id",
33+
external_user_id="external_user_id",
3534
)
3635
```
3736

@@ -53,10 +52,9 @@ client = AsyncPipedream(
5352

5453

5554
async def main() -> None:
56-
await client.accounts.create(
57-
app_slug="app_slug",
58-
cfmap_json="cfmap_json",
59-
connect_token="connect_token",
55+
await client.actions.run(
56+
id="id",
57+
external_user_id="external_user_id",
6058
)
6159

6260

@@ -72,7 +70,7 @@ will be thrown.
7270
from pipedream.core.api_error import ApiError
7371

7472
try:
75-
client.accounts.create(...)
73+
client.actions.run(...)
7674
except ApiError as e:
7775
print(e.status_code)
7876
print(e.body)
@@ -112,7 +110,7 @@ from pipedream import Pipedream
112110
client = Pipedream(
113111
...,
114112
)
115-
response = client.accounts.with_raw_response.create(...)
113+
response = client.actions.with_raw_response.run(...)
116114
print(response.headers) # access the response headers
117115
print(response.data) # access the underlying object
118116
pager = client.apps.list(...)
@@ -140,7 +138,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret
140138
Use the `max_retries` request option to configure this behavior.
141139

142140
```python
143-
client.accounts.create(..., request_options={
141+
client.actions.run(..., request_options={
144142
"max_retries": 1
145143
})
146144
```
@@ -160,7 +158,7 @@ client = Pipedream(
160158

161159

162160
# Override timeout for a specific method
163-
client.accounts.create(..., request_options={
161+
client.actions.run(..., request_options={
164162
"timeout_in_seconds": 1
165163
})
166164
```

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "pipedream"
33

44
[tool.poetry]
55
name = "pipedream"
6-
version = "1.0.1"
6+
version = "1.0.2"
77
description = ""
88
readme = "README.md"
99
authors = []

src/pipedream/core/client_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ def __init__(
2727

2828
def get_headers(self) -> typing.Dict[str, str]:
2929
headers: typing.Dict[str, str] = {
30-
"User-Agent": "pipedream/1.0.1",
30+
"User-Agent": "pipedream/1.0.2",
3131
"X-Fern-Language": "Python",
3232
"X-Fern-SDK-Name": "pipedream",
33-
"X-Fern-SDK-Version": "1.0.1",
33+
"X-Fern-SDK-Version": "1.0.2",
3434
**(self.get_custom_headers() or {}),
3535
}
3636
if self._project_environment is not None:

0 commit comments

Comments
 (0)