- Scouting Draft
- Tech-stacks
- Installation For dev machine
- Api - beginner
- Api : getAllByType()
- Api : GetSingleByTypeAndId()
- Api : GetMatchData()
- Api : GetMatchDataByTeamAndCompetition()
- Api : getAllStudentsToCsv()
- Api : getMatchByTargetValueToCsv()
- TODO/InProgress
Scouting Draft Web Api handles
-
get all for given entity ( type in 2019 { students, devices, competitions, rank, pit-data, matches, maatch-data, current-match})
-
get single item for given entity
-
get single match result for given competition and match
-
get all match result for specific team in specfic competition
-
[future] filter by given param (for example, HAB Level >= 2)
-
[future] filter by given param (for example, anels/balls during SS (Auto), Cargo-Ship panels/balls during SS, Rocket scoring during SS)
- firebase real-time database
- node
- firebase functions
-
Recommended: just the latest node and npm, then open in PowerShell:
npm install -g firebase-tools firebase login firebase init npm install firebase-admin@latest firebase-functions@latest //get the latest code firebase deploy firebase deploy --only functions firebase deploy --only functions:getAllByTypeToCsv,functions:GetMatchDataByTeamAndCompetition
-
for testing purpose, recommended to create your own firebase project:
1) create new firebase 2) export the data (as json .~10mb) from existing team DB -> pearadox-2019 https://console.firebase.google.com/u/0/project/pearadox-2019/database/pearadox-2019/data~2F 3) for iinstance, I created my own instance called "scouting-draft-test" https://console.firebase.google.com/u/0/project/scouting-draft-test/database
- Root Page : https://console.firebase.google.com/u/0/project/scouting-draft-test/overview
- RealTime DB: https://console.firebase.google.com/u/0/project/scouting-draft-test/database/scouting-draft-test/data~2Fmatch-data
- (for beginner) helloworld : https://us-central1-scouting-draft-test.cloudfunctions.net/helloWorld
- (for beginner) Get Single Student : https://us-central1-scouting-draft-test.cloudfunctions.net/getStudent
-
this will return all the reords by given type
GET /getAllByType/{EntityType}
-
Root Page : https://console.firebase.google.com/u/0/project/scouting-draft-test/overview
-
RealTime DB: https://console.firebase.google.com/u/0/project/scouting-draft-test/database/
-
https://us-central1-scouting-draft-test.cloudfunctions.net/getAllByType/current-match
-
https://us-central1-scouting-draft-test.cloudfunctions.net/getAllByType/devices
-
https://us-central1-scouting-draft-test.cloudfunctions.net/getAllByType/match-data
-
https://us-central1-scouting-draft-test.cloudfunctions.net/getAllByType/matches
-
https://us-central1-scouting-draft-test.cloudfunctions.net/getAllByType/rank
-
https://us-central1-scouting-draft-test.cloudfunctions.net/getAllByType/students
-
https://us-central1-scouting-draft-test.cloudfunctions.net/getAllByType/competitions
-
https://us-central1-scouting-draft-test.cloudfunctions.net/getAllByType/teams
-
https://us-central1-scouting-draft-test.cloudfunctions.net/getAllByType/pit-data
-
this will return a single reord by given type and id
GET /GetSingleByTypeAndId/{EntityType}/{EntityId}
-
Root Page : https://console.firebase.google.com/u/0/project/scouting-draft-test/overview
-
RealTime DB: https://console.firebase.google.com/u/0/project/scouting-draft-test/database/
-
https://us-central1-scouting-draft-test.cloudfunctions.net/GetSingleByTypeAndId/competitions/txcha
-
https://us-central1-scouting-draft-test.cloudfunctions.net/GetSingleByTypeAndId/teams/ftcmp
-
https://us-central1-scouting-draft-test.cloudfunctions.net/GetSingleByTypeAndId/match-data/ftcmp
-
https://us-central1-scouting-draft-test.cloudfunctions.net/GetSingleByTypeAndId/match-data/test
-
this will return all match reord (~6 matches in 2019) by given competition {Competition-Id} and event-Id {match-id-prefix} (*)
-
(*) : it is doing the string matching as wide-card for any match name matching as prefix.
GET /GetSingleByTypeAndId/{Competition-Id}/{match-id-prefix}
-
Root Page : https://console.firebase.google.com/u/0/project/scouting-draft-test/overview
-
RealTime DB: https://console.firebase.google.com/u/0/project/scouting-draft-test/database/
-
all 6 matches in match [001] in competition [gal] -- https://us-central1-scouting-draft-test.cloudfunctions.net/GetMatchData/gal/001-
-
one result (as there is only 1 team-name starting with '45') :- with string matching logic -- https://us-central1-scouting-draft-test.cloudfunctions.net/GetMatchData/gal/001-45
-
this will return all match reord for a given team and in a given competition {Competition-Id}
GET /GetMatchDataByTeamAndCompetition/{Competition-Id}/{TeamId}
-
Root Page : https://console.firebase.google.com/u/0/project/scouting-draft-test/overview
-
RealTime DB: https://console.firebase.google.com/u/0/project/scouting-draft-test/database/
-
this will downlaod a CSV file which contains all the student
GET /getAllStudentsToCsv
-
Root Page : https://console.firebase.google.com/u/0/project/scouting-draft-test/overview
-
RealTime DB: https://console.firebase.google.com/u/0/project/scouting-draft-test/database/
-
https://us-central1-scouting-draft-test.cloudfunctions.net/getAllStudentsToCsv
-
this will downlaod a CSV file which contains all the match with the target value
GET /getMatchByTargetValueToCsv2/{target-value}
{inprogress} :- only filter the tele_CargoLPan for now with the {target-value}
-
https://us-central1-scouting-draft-test.cloudfunctions.net/getAllMatchesWithTargetValueToCsv2/2
-
https://us-central1-scouting-draft-test.cloudfunctions.net/getAllMatchesWithTargetValueToCsv2/3
- revisit the use-case in the existing app
- webUI mockup
--junk below-- firebase deploy --only functions:getAllByTypeToCsv,functions:getAllMatchesWithTargetValueToCsv https://github.com/Pearadox/Scout-19_5414/blob/master/app/src/main/java/com/pearadox/scout_5414/matchData.java