-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.txt
51 lines (27 loc) · 1.3 KB
/
api.txt
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
## API
### Create
_jersey/api/v1/Jersey/create_
In the post body as form data this expects:
A team (CharField), number (PositiveIntegerField), player(CharField), shirt_size(S,M,L,XL,XXL choices), primary_color (CharField), secondary_color (CharField)
_jersey/api/v1/User/create_
In the post body as form data this expects:
first_name (CharField), last_name(CharField), shirt_size(S,M,L,XL,XXL choices), email (CharField)
### Read
_jersey/api/v1/Jersey_
This returns all Jerseys in the databse.
_jersey/api/v1/User_
This returns all Users in the database.
_jersey/api/v1/Jersey/<int:id>_
This allows you to specify an ID for a Jersey to retur.n
_jersey/api/v1/User/<int:id>_
This allows you to specify an ID for a User to return.
### Update
_jersey/api/v1/Jersey/<int:id>/update_
This takes the exact same form data as the create endpoint but will not create a jersey and instead will update the jersey to whatever data is sent.
_jersey/api/v1/User/<int:id>/update_
This takes the exact same form data as the create endpoint but will not create a user and instead will update the user to whatever data is sent.
### Delete
_jersey/api/v1/User/<int:id>/delete_
This endpoint deletes a user with the specified id.
_jersey/api/v1/Jersey/<int:id>/delete_
This endpoint deletes a jersey with the specified id.