/scouting-draft-test

scouting draft

Primary LanguageTypeScript

Table of Contents

  1. Scouting Draft
  2. Tech-stacks
  3. Installation For dev machine
  4. Api - beginner
  5. Api : getAllByType()
  6. Api : GetSingleByTypeAndId()
  7. Api : GetMatchData()
  8. Api : GetMatchDataByTeamAndCompetition()
  9. Api : getAllStudentsToCsv()
  10. Api : getMatchByTargetValueToCsv()
  11. TODO/InProgress

Scouting Draft - Use Cases

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)

Tech-stacks

  • firebase real-time database
  • node
  • firebase functions

Installation

For dev machine

  • 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
    

Api - for beginner

Api - getAllByType()

Api - GetSingleByTypeAndId()

Api - GetMatchData()

Api - GetMatchDataByTeamAndCompetition()

Api - getAllStudentsToCsv()

Api - getMatchByTargetValueToCsv2()

  • 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}

TODO/InProgress

  • 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