@@ -396,10 +396,7 @@ options = {
396396 " authorization_model_id" : " 01GXSA8YR785C4FYS3C0RTG7B1"
397397}
398398
399- response = await fga_client.read_authorization_model({
400- # You can rely on the model id set in the configuration or override it for this specific request
401- " authorization_model_id" : " 01GXSA8YR785C4FYS3C0RTG7B1"
402- })
399+ response = await fga_client.read_authorization_model(options)
403400# response.authorization_model = AuthorizationModel(id='01GXSA8YR785C4FYS3C0RTG7B1', schema_version = '1.1', type_definitions=type_definitions[...])
404401```
405402
@@ -429,7 +426,7 @@ options = {
429426 " page_size" : " 25" ,
430427 " continuation_token" : " eyJwayI6IkxBVEVTVF9OU0NPTkZJR19hdXRoMHN0b3JlIiwic2siOiIxem1qbXF3MWZLZExTcUoyN01MdTdqTjh0cWgifQ=="
431428}
432- body = ClientReadChangesRequest(type = ' document' )
429+ body = ClientReadChangesRequest(type = " document" )
433430
434431response = await fga_client.read_changes(body, options)
435432# response.continuation_token = ...
@@ -565,6 +562,11 @@ body = ClientWriteRequest(
565562 user = " user:81684243-9356-4421-8fbf-a4f8d36aa31b" ,
566563 relation = " viewer" ,
567564 object = " document:roadmap" ,
565+ ),
566+ ClientTuple(
567+ user = " user:81684243-9356-4421-8fbf-a4f8d36aa31b" ,
568+ relation = " viewer" ,
569+ object = " document:budget" ,
568570 condition = RelationshipCondition(
569571 name = ' ViewCountLessThan200' ,
570572 context = dict (
@@ -573,11 +575,6 @@ body = ClientWriteRequest(
573575 ),
574576 ),
575577 ),
576- ClientTuple(
577- user = " user:81684243-9356-4421-8fbf-a4f8d36aa31b" ,
578- relation = " viewer" ,
579- object = " document:budget" ,
580- ),
581578 ],
582579 deletes = [
583580 ClientTuple(
@@ -641,7 +638,7 @@ body = [ClientCheckRequest(
641638 ],
642639 context = dict (
643640 ViewCount = 100
644- ),
641+ )
645642), ClientCheckRequest(
646643 user = " user:81684243-9356-4421-8fbf-a4f8d36aa31b" ,
647644 relation = " admin" ,
@@ -675,9 +672,9 @@ response = await fga_client.batch_check(body, options)
675672# relation: "editor",
676673# object: "document:roadmap"
677674# }],
678- # context=dict(
679- # ViewCount=100
680- # ),
675+ # context=dict(
676+ # ViewCount=100
677+ # )
681678# }
682679# }, {
683680# allowed: false,
@@ -798,7 +795,7 @@ Read assertions for a particular authorization model.
798795
799796[ API Documentation] ( https://openfga.dev/api/service#/Assertions/Read%20Assertions )
800797
801- ``` csharp
798+ ``` python
802799options = {
803800 # You can rely on the model id set in the configuration or override it for this specific request
804801 " authorization_model_id" : " 01GXSA8YR785C4FYS3C0RTG7B1"
@@ -812,7 +809,7 @@ Update the assertions for a particular authorization model.
812809
813810[ API Documentation] ( https://openfga.dev/api/service#/Assertions/Write%20Assertions )
814811
815- ``` csharp
812+ ``` python
816813options = {
817814 # You can rely on the model id set in the configuration or override it for this specific request
818815 " authorization_model_id" : " 01GXSA8YR785C4FYS3C0RTG7B1"
0 commit comments