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
Copy file name to clipboardExpand all lines: CHANGELOG.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
@@ -6,7 +6,7 @@
6
6
7
7
### Breaking Changes
8
8
9
-
- The `_return_http_data_only`, `_request_auth`, and `_preload_content` kwargs have been removed from all `OpenFgaApi` and `SyncOpenFgaApi` endpoint methods. These were internal implementation details not intended for external use. `_return_http_data_only` is now hardcoded to `True` internally, meaning all endpoint methods always return the deserialized response object directly. Users relying on `_with_http_info` methods returning a `(data, status, headers)` tuple should use `execute_api_request` instead.
9
+
- The `_return_http_data_only`, `_preload_content`, `_request_auth`, `async_req`, and `_request_timeout` kwargs have been removed from all `OpenFgaApi` and `SyncOpenFgaApi` endpoint methods. These were internal implementation details not intended for external use. `_return_http_data_only` is now hardcoded to `True`; all endpoint methods return the deserialized response object directly. Users relying on `_with_http_info` methods returning a `(data, status, headers)` tuple should use `execute_api_request` instead.
In certain cases you may want to call other APIs not yet wrapped by the SDK. You can do so by using the `execute_api_request` method available on the `OpenFgaClient`. It allows you to make raw HTTP calls to any OpenFGA endpoint by specifying the HTTP method, path, body, query parameters, and path parameters, while still honoring the client configuration (authentication, telemetry, retries, and error handling).
1267
1267
1268
-
For streaming endpoints, use `execute_streamed_api_request` instead.
1268
+
For streaming endpoints (e.g. `streamed-list-objects`), use `execute_streamed_api_request` instead. It returns an `AsyncIterator` (or `Iterator` in the sync client) that yields one parsed JSON object per chunk.
1269
1269
1270
1270
This is useful when:
1271
1271
- You want to call a new endpoint that is not yet supported by the SDK
asyncfor chunk in fga_client.execute_streamed_api_request(
1323
+
operation_name="StreamedListObjects",
1324
+
method="POST",
1325
+
path="/stores/{store_id}/streamed-list-objects",
1326
+
path_params={"store_id": FGA_STORE_ID},
1327
+
body={
1328
+
"type": "document",
1329
+
"relation": "viewer",
1330
+
"user": "user:anne",
1331
+
"authorization_model_id": FGA_MODEL_ID,
1332
+
},
1333
+
):
1334
+
# Each chunk has the shape {"result": {"object": "..."}} or {"error": {...}}
1335
+
if"result"in chunk:
1336
+
print(chunk["result"]["object"]) # e.g. "document:roadmap"
1337
+
```
1338
+
1318
1339
#### Example: Using Path Parameters
1319
1340
1320
1341
Path parameters are specified in the path using `{param_name}` syntax and must all be provided explicitly via `path_params` (URL-encoded automatically):
0 commit comments