Spaces:
Running
Running
James McCool
commited on
Commit
·
0d70ecc
1
Parent(s):
5f7d13b
Update data update options in app.py to include 'Betting Model' and 'Strength of Sched'. Implemented API calls for these new data sources, enhancing the functionality of the data updates tab.
Browse files
app.py
CHANGED
|
@@ -50,7 +50,7 @@ proj_source_options = ['Dwain', 'Freedman', 'Kickers', 'Defenses']
|
|
| 50 |
proj_replace_options = ['dwain', 'freedman', 'kickers', 'defenses']
|
| 51 |
ros_source_options = ['Laghezza', 'Ronis', 'Dwain', 'Freedman']
|
| 52 |
ros_replace_options = ['laghezza', 'ronis', 'dwain', 'freedman']
|
| 53 |
-
data_update_options = ['DFS', 'DVP', 'Air Yards', 'FAAB']
|
| 54 |
|
| 55 |
|
| 56 |
def grab_sr_fa(headers: dict) -> pd.DataFrame:
|
|
@@ -830,6 +830,10 @@ with tab7:
|
|
| 830 |
response = requests.post(f"https://api.fantasylife.com/api/air-yards/v1/force-update", headers=headers)
|
| 831 |
elif choose_data_source == 'FAAB':
|
| 832 |
response = requests.post(f"https://api.fantasylife.com/api/waivers/v1/force-update", headers=headers)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 833 |
if response.status_code == 200:
|
| 834 |
st.write("Uploading!")
|
| 835 |
st.write(response.json())
|
|
|
|
| 50 |
proj_replace_options = ['dwain', 'freedman', 'kickers', 'defenses']
|
| 51 |
ros_source_options = ['Laghezza', 'Ronis', 'Dwain', 'Freedman']
|
| 52 |
ros_replace_options = ['laghezza', 'ronis', 'dwain', 'freedman']
|
| 53 |
+
data_update_options = ['Betting Model', 'DFS', 'DVP', 'Strength of Sched', 'Air Yards', 'FAAB']
|
| 54 |
|
| 55 |
|
| 56 |
def grab_sr_fa(headers: dict) -> pd.DataFrame:
|
|
|
|
| 830 |
response = requests.post(f"https://api.fantasylife.com/api/air-yards/v1/force-update", headers=headers)
|
| 831 |
elif choose_data_source == 'FAAB':
|
| 832 |
response = requests.post(f"https://api.fantasylife.com/api/waivers/v1/force-update", headers=headers)
|
| 833 |
+
elif choose_data_source == 'Strength of Sched':
|
| 834 |
+
response = requests.post(f"https://api.fantasylife.com/api/sos/v1/force-update", headers=headers)
|
| 835 |
+
elif choose_data_source == 'Betting Model':
|
| 836 |
+
response = requests.post(f"https://api.fantasylife.com/api/nfl/v1/season/odds/update", headers=headers)
|
| 837 |
if response.status_code == 200:
|
| 838 |
st.write("Uploading!")
|
| 839 |
st.write(response.json())
|