MCPcopy Index your code
hub / github.com/RiotGames/developer-relations / show_data

Function show_data

sample_apps/rso_sample_apps/python/main.py:109–128  ·  view source on GitHub ↗

tBD

(access_token: str)

Source from the content-addressed store, hash-verified

107
108@app.get("/show-data/", response_class=HTMLResponse)
109def show_data(access_token: str):
110 """
111 tBD
112 """
113 account_data = get_account_data(access_token)
114 account_html = f"""
115 <h2>account data queried using RSO Access Token:</h2>
116 <p>{json2table(json=account_data)}</p>
117 """
118
119 champion_rotation_data = get_champion_rotation_data(CONFIG["RGAPI_TOKEN"])
120 champion_rotation_html = f"""
121 <h2>champion rotation data queried using RGAPI token</h2>
122 <p>{json2table(json=champion_rotation_data)}</p>
123 """
124
125 return f"""
126 {account_html}
127 {champion_rotation_html}
128 """
129
130
131def get_account_data(access_token):

Callers

nothing calls this directly

Calls 3

get_account_dataFunction · 0.70
json2tableFunction · 0.70

Tested by

no test coverage detected