-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathgroups.py
More file actions
33 lines (27 loc) · 1.02 KB
/
groups.py
File metadata and controls
33 lines (27 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Code generated by op-codegen - DO NO EDIT MANUALLY
from .core import InnerClient
from pydantic import TypeAdapter
from .types import Group, GroupGetParams
class Groups:
"""
The Groups API holds all the operations the SDK client can perform on 1Password groups.
"""
def __init__(self, inner_client: InnerClient):
self.inner_client = inner_client
async def get(self, group_id: str, group_params: GroupGetParams) -> Group:
response = await self.inner_client.invoke(
{
"invocation": {
"clientId": self.inner_client.client_id,
"parameters": {
"name": "GroupsGet",
"parameters": {
"group_id": group_id,
"group_params": group_params.model_dump(by_alias=True),
},
},
}
}
)
response = TypeAdapter(Group).validate_json(response)
return response