Skip to content

Commit 840bc79

Browse files
committed
updates
1 parent 7d1ec7a commit 840bc79

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,24 +1275,20 @@ In all cases, you initialize the SDK the same way as usual, and then call `raw_r
12751275
```python
12761276
from openfga_sdk import ClientConfiguration, OpenFgaClient
12771277

1278-
# Initialize the client, same as above
12791278
configuration = ClientConfiguration(
12801279
api_url=FGA_API_URL,
12811280
store_id=FGA_STORE_ID,
12821281
)
12831282

12841283
async with OpenFgaClient(configuration) as fga_client:
1285-
# Custom new endpoint that doesn't exist in the SDK yet
12861284
request_body = {
12871285
"user": "user:bob",
12881286
"action": "custom_action",
12891287
"resource": "resource:123",
12901288
}
12911289

1292-
# Make the request
1293-
# Note: operation_name is required for telemetry/logging
12941290
response = await fga_client.raw_request(
1295-
operation_name="CustomEndpoint", # Required: descriptive name for the operation
1291+
operation_name="CustomEndpoint",
12961292
method="POST",
12971293
path="/stores/{store_id}/custom-endpoint",
12981294
path_params={"store_id": FGA_STORE_ID},
@@ -1348,7 +1344,6 @@ if result:
13481344
if "allowed" in result:
13491345
print(f"Allowed: {result['allowed']}")
13501346

1351-
# You can still access raw response metadata:
13521347
print(f"Status Code: {response.status}")
13531348
print(f"Headers: {response.headers}")
13541349
```
@@ -1395,7 +1390,6 @@ response = await fga_client.raw_request(
13951390
path_params={
13961391
"model_id": "your-model-id",
13971392
},
1398-
# store_id will be automatically taken from configuration
13991393
)
14001394
```
14011395

0 commit comments

Comments
 (0)