You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat!: return full FetchResponse from context.fetch() (#20)
* Return full FetchResponse from context.fetch() (#12)
Add FetchResponse dataclass (status, headers, data) and update
ExecutionContext.fetch() to return it instead of the raw parsed body.
Export FetchResponse from the package.
* Update docs and samples for FetchResponse (#12)
Update all code examples, docstrings, and prose to use response.data
instead of the raw response body, reflecting the new FetchResponse
return type from context.fetch().
* Add migration plan for FetchResponse rollout (#12)
* Complete migration plan with full file inventory (#12)
Add 43 missing production files and 13 test files to the
autohive-integrations audit list.
* fix: restore ActionError in public exports
* docs: update remaining response → response.data in README_PYPI and ActionError example
* docs: add ActionError, FetchResponse, HTTPError/RateLimitError to module docstring
* Update apidocs for 2.0.0
* Add API docs maintenance guidelines to RELEASING.md and AGENTS.md
Copy file name to clipboardExpand all lines: docs/manual/building_your_first_integration.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -223,7 +223,7 @@ class GetItemsAction(ActionHandler):
223
223
params={"limit": limit}
224
224
)
225
225
226
-
items = response.get("data", [])
226
+
items = response.data.get("data", [])
227
227
228
228
return ActionResult(
229
229
data={
@@ -254,7 +254,7 @@ class GetItemsAction(ActionHandler):
254
254
**`ActionHandler`** — Base class for all action handlers. You must implement the `async def execute()` method.
255
255
256
256
**`ExecutionContext`** — Provided to every handler. Gives you:
257
-
-`context.fetch(url, ...)` — Make HTTP requests with automatic auth handling
257
+
-`context.fetch(url, ...)` — Make HTTP requests with automatic auth handling; returns a `FetchResponse` with `.status`, `.headers`, and `.data` attributes
**`ActionResult`** — The required return type for all action handlers. Contains:
@@ -263,7 +263,7 @@ class GetItemsAction(ActionHandler):
263
263
264
264
### Making HTTP Requests
265
265
266
-
Use `context.fetch()` for all HTTP calls. It handles authentication headers, retries, timeouts, and response parsing automatically.
266
+
Use `context.fetch()` for all HTTP calls. It handles authentication headers, retries, timeouts, and response parsing automatically. It returns a `FetchResponse` object — access the parsed body via `.data`, the HTTP status via `.status`, and response headers via `.headers`.
Copy file name to clipboardExpand all lines: docs/manual/integration_structure.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -179,7 +179,7 @@ Required fields:
179
179
Optional fields:
180
180
-`scopes`: array of OAuth scopes to request
181
181
182
-
With platform auth, `context.fetch()` automatically injects the `Authorization` header.
182
+
With platform auth, `context.fetch()` automatically injects the `Authorization` header and returns a `FetchResponse` object (with `.status`, `.headers`, and `.data` attributes).
0 commit comments