-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresources.py
More file actions
35 lines (29 loc) · 822 Bytes
/
resources.py
File metadata and controls
35 lines (29 loc) · 822 Bytes
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
34
35
from typing import List
from ..base import ResourceBase, APIOperation
from .models import Team, TeamCreate
class TeamsResource(ResourceBase):
"""Contains all API operations for team ressources."""
list = APIOperation(
method="GET",
endpoint_template="/teams",
input_model=None,
response_model=List[Team],
)
get = APIOperation(
method="GET",
endpoint_template="/teams/{team_id}",
input_model=None,
response_model=Team,
)
create = APIOperation(
method="POST",
endpoint_template="/teams",
input_model=TeamCreate,
response_model=Team,
)
delete = APIOperation(
method="DELETE",
endpoint_template="/teams/{team_id}",
input_model=None,
response_model=None,
)