Backend support for read only view of Valorant Student Tracker. This backend supports pulling student notes from the Google Sheets API and returning them to frontend.
- Rate limit student requests to 100 per day
- Only connect to the known Student Tracking Google Sheet
- All student notes are still considered to be public. No authentication will be required to read a note.
import requests
import json
response = requests.get("http://localhost:5000/list_students")
student_response = json.loads(response.content)
for student in student_response["students"]:
print(f"{student} has gained RR thanks to Woohoojin")
URL : /list_students
Method : GET
Auth required : NO
Permissions required : None
Rate limit : 100 requests per day
Description : Returns a list of all student usernames currently in the tracking sheet.
Code : 200 OK
Content examples
{
"students": [
"Student 1 Username",
"Student 2 Username"
]
}
Code : 429 Too Many Requests
Content examples
For the 101st request made in a given day.
Too Many Requests
100 per 1 day
URL : /student?name=<student_name>
Method : GET
Auth required : NO
Permissions required : None
Rate limit : 100 requests per day
Description : Returns a student overview including all of their notes. Notes will be sorted most-recent note first
Code : 200 OK
Content examples
{
"student": [
"name": "Student Username",
"tracker": "https://tracker.gg/student",
"startingRank": "Diamond 1",
"notes": [
{
"date": "2023-08-30T00:00:00",
"content": "Click better"
},
{
"date": "2023-08-29T00:00:00",
"content": "Click better"
}
]
]
}
Code : 400 Bad Request
Content examples
If ?name=<student_name>
is not included in the request query params.
404 Not Found
Code : 404 Not Found
Content examples
If the requested <student_name>
does not appear in the Valorant Tracker Google Sheet.
404 Not Found
Code : 429 Too Many Requests
Content examples
For the 101st request made in a given day.
Too Many Requests
100 per 1 day
To run this project you can pull the Docker image directly from GitHub packages:
docker pull ghcr.io/braddotcoffee/valorantstudenttrackerbackend:main
docker tag ghcr.io/braddotcoffee/valorantstudenttrackerbackend:main student-tracker-backend
Or build it locally:
docker build . -t student-tracker-backend
Define a config.yaml
and secrets.yaml
file to specify your Google API Key and Spreadsheet ID.
Your Spreadsheet ID must be to a publicly viewable spreadsheet.
Google:
SheetID: <your_sheet_id>
Google:
API_KEY: <your_api_key>
Copy the contents of compose.yaml to your local directory and run
docker compose up
Mount the config.yaml
and secrets.yaml
file as part of docker run
.
docker run -p 5000:5000 \
--name student-tracker-backend \
--mount type=bind,source="$(pwd)"/secrets.yaml,target=/secrets.yaml,readonly \
--mount type=bind,source="$(pwd)"/config.yaml,target=/config.yaml,readonly \
student-tracker-backend