Spaces:
Sleeping
Sleeping
import streamlit as st | |
import requests | |
st.set_page_config(layout="wide") | |
dwain_url = "https://www.fantasylife.com/api/projections/v1/nfl/dwain/season/update" | |
freedman_url = "https://www.fantasylife.com/api/projections/v1/nfl/freedman/season/update" | |
agg_url = "https://www.fantasylife.com/api/projections/v1/nfl/aggregate/season/update" | |
weekly_dwain_url = "https://www.fantasylife.com/api/projections/v1/nfl/james/game/update" | |
weekly_freedman_url = "https://www.fantasylife.com/api/projections/v1/nfl/freedman/game/update" | |
weekly_agg_url = "https://www.fantasylife.com/api/projections/v1/nfl/aggregate/game/update" | |
dev_dwain_url = "https://www.fantasylife.dev.spotlightsportsb2b.com/api/projections/v1/nfl/dwain/season/update" | |
dev_freedman_url = "https://www.fantasylife.dev.spotlightsportsb2b.com/api/projections/v1/nfl/freedman/season/update" | |
dev_agg_url = "https://www.fantasylife.dev.spotlightsportsb2b.com/api/projections/v1/nfl/aggregate/season/update" | |
headers = { | |
'Authorization': 'Bearer 6984da1f-2c81-4140-8206-d018af38533f', | |
} | |
with st.container(): | |
col1, col2, col3 = st.columns([3, 3, 3]) | |
with col1: | |
st.info("Update Dwain's LIVE SITE FantasyLife Season Long Projections") | |
if st.button("Dwain Projection Update (Live Seasonal)", key='reset1'): | |
response = requests.post(dwain_url, headers=headers) | |
if response.status_code == 200: | |
st.write("Uploading!") | |
with col2: | |
st.info("Update Freedman's LIVE SITE FantasyLife Season Long Projections") | |
if st.button("Freedman Projection Update (Live Seasonal)", key='reset2'): | |
response = requests.post(freedman_url, headers=headers) | |
if response.status_code == 200: | |
st.write("Uploading!") | |
with col3: | |
st.info("Update the Aggregate LIVE SITE FantasyLife Season Long Projections") | |
if st.button("Aggregate Projection Update (Live Seasonal)", key='reset3'): | |
response = requests.post(agg_url, headers=headers) | |
if response.status_code == 200: | |
st.write("Uploading!") | |
with st.container(): | |
col1, col2, col3 = st.columns([3, 3, 3]) | |
with col1: | |
st.info("Update Dwain's DEV SITE FantasyLife Season Long Projections") | |
if st.button("Dwain Projection Update (Dev Seasonal)", key='reset4'): | |
response = requests.post(dev_dwain_url, headers=headers) | |
if response.status_code == 200: | |
st.write("Uploading!") | |
with col2: | |
st.info("Update Freedman's DEV SITE FantasyLife Season Long Projections") | |
if st.button("Freedman Projection Update (Dev Seasonal)", key='reset5'): | |
response = requests.post(dev_freedman_url, headers=headers) | |
if response.status_code == 200: | |
st.write("Uploading!") | |
with col3: | |
st.info("Update the Aggregate DEV SITE FantasyLife Season Long Projections") | |
if st.button("Aggregate Projection Update (Dev Seasonal)", key='reset6'): | |
response = requests.post(dev_agg_url, headers=headers) | |
if response.status_code == 200: | |
st.write("Uploading!") | |
with st.container(): | |
col1, col2, col3 = st.columns([3, 3, 3]) | |
with col1: | |
st.info("Update Dwain's FantasyLife Weekly Projections") | |
if st.button("Dwain Projection Update (Weekly)", key='reset4'): | |
response = requests.post(weekly_dwain_url, headers=headers) | |
if response.status_code == 200: | |
st.write("Uploading!") | |
with col2: | |
st.info("Update Freedman's FantasyLife Weekly Projections") | |
if st.button("Freedman Projection Update (Weekly)", key='reset5'): | |
response = requests.post(weekly_freedman_url, headers=headers) | |
if response.status_code == 200: | |
st.write("Uploading!") | |
with col3: | |
st.info("Update the Aggregate FantasyLife Weekly Projections") | |
if st.button("Aggregate Projection Update (Weekly)", key='reset6'): | |
response = requests.post(weekly_agg_url, headers=headers) | |
if response.status_code == 200: | |
st.write("Uploading!") |