-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(python-sdk): Introduce synchronous OpenFgaClient
- Loading branch information
1 parent
7b2d673
commit 5185beb
Showing
12 changed files
with
383 additions
and
263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- clients/fga-python-sdk/openfga_sdk_sync/api/open_fga_api.py 2022-09-13 14:15:46.000000000 -0400 | ||
+++ open_fga_api.py 2022-09-13 14:14:01.000000000 -0400 | ||
@@ -197,13 +197,15 @@ | ||
collection_formats=collection_formats, | ||
_request_auth=local_var_params.get('_request_auth')) | ||
|
||
- def create_store(self, **kwargs): # noqa: E501 | ||
+ def create_store(self, body, **kwargs): # noqa: E501 | ||
"""Create a store # noqa: E501 | ||
|
||
Create a unique OpenFGA store which will be used to store authorization models and relationship tuples. # noqa: E501 | ||
|
||
- >>> thread = api.create_store() | ||
+ >>> thread = api.create_store(body) | ||
|
||
+ :param body: (required) | ||
+ :type body: CreateStoreRequest | ||
:param async_req: Whether to execute the request asynchronously. | ||
:type async_req: bool, optional | ||
:param _preload_content: if False, the urllib3.HTTPResponse object will | ||
@@ -216,15 +218,17 @@ | ||
:rtype: CreateStoreResponse | ||
""" | ||
kwargs['_return_http_data_only'] = True | ||
- return self.create_store_with_http_info(**kwargs) # noqa: E501 | ||
+ return self.create_store_with_http_info(body, **kwargs) # noqa: E501 | ||
|
||
- def create_store_with_http_info(self, **kwargs): # noqa: E501 | ||
+ def create_store_with_http_info(self, body, **kwargs): # noqa: E501 | ||
"""Create a store # noqa: E501 | ||
|
||
Create a unique OpenFGA store which will be used to store authorization models and relationship tuples. # noqa: E501 | ||
|
||
- >>> thread = api.create_store_with_http_info() | ||
+ >>> thread = api.create_store_with_http_info(body) | ||
|
||
+ :param body: (required) | ||
+ :type body: CreateStoreRequest | ||
:param async_req: Whether to execute the request asynchronously. | ||
:type async_req: bool, optional | ||
:param _return_http_data_only: response data without head status code | ||
@@ -253,6 +257,8 @@ | ||
|
||
all_params = [ | ||
|
||
+ 'body' | ||
+ | ||
] | ||
all_params.extend( | ||
[ | ||
@@ -312,7 +318,7 @@ | ||
} | ||
|
||
return self.api_client.call_api( | ||
- '/stores'.replace('{store_id}', store_id), 'POST', | ||
+ '/stores', 'POST', | ||
path_params, | ||
query_params, | ||
header_params, | ||
@@ -998,7 +1004,7 @@ | ||
} | ||
|
||
return self.api_client.call_api( | ||
- '/stores'.replace('{store_id}', store_id), 'GET', | ||
+ '/stores', 'GET', | ||
path_params, | ||
query_params, | ||
header_params, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.