-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadd-teams.py
50 lines (46 loc) · 1.01 KB
/
add-teams.py
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
import requests
url = "http://localhost:8000/teams/add"
teams = [{
"fullName": "Chennai Super Kings",
"shortName": "CSK",
"colorCode": "#FCCA06"
},{
"fullName": "Delhi Capitals",
"shortName": "DC",
"colorCode": "#0078BC"
},{
"fullName": "Gujarat Titans",
"shortName": "GT",
"colorCode": "#1B2133"
},{
"fullName": "Kolkata Knight Riders",
"shortName": "KKR",
"colorCode": "#3A225D"
},{
"fullName": "Lucknow Super Giants",
"shortName": "LSG",
"colorCode": "#0057E2"
},{
"fullName": "Mumbai Indians",
"shortName": "MI",
"colorCode": "#006CB7"
},{
"fullName": "Punjab Kings",
"shortName": "PBKS",
"colorCode": "#DD1F2D"
},{
"fullName": "Rajasthan Royals",
"shortName": "RR",
"colorCode": "#EA1A85"
},{
"fullName": "Royal Challengers Bangaluru",
"shortName": "RCB",
"colorCode": "#84171B"
},{
"fullName": "Sunrisers Hyderabad",
"shortName": "SRH",
"colorCode": "#EE7429"
}]
for payload in teams:
response = requests.request("POST", url, data=payload)
print(response.text)