feat: implement multi-state tournament querying for Challonge API v2.1

- Add tournament-query.js utility with queryAllTournaments() and helper functions
  * Makes 3 parallel API calls (pending, in_progress, ended states)
  * Uses Promise.all() to wait for all requests
  * Deduplicates results by tournament ID using Map
  * Replaces invalid state: 'all' parameter (API doesn't support 'all' value)

- Implement 5 convenience functions:
  * queryAllTournaments() - Query all states with custom options
  * queryUserTournaments() - Query user's tournaments (shorthand)
  * queryCommunityTournaments() - Query community tournaments
  * queryActiveTournaments() - Query pending + in_progress only
  * queryCompletedTournaments() - Query ended tournaments only
  * queryTournamentsByStates() - Query custom state combinations

- Update ChallongeTest.vue to use queryAllTournaments()
  * Replace invalid state: 'all' with proper multi-state query
  * Now correctly fetches tournaments from all states
  * Update console logging to show all 3 states being queried

- Add comprehensive TOURNAMENT_QUERY_GUIDE.md documentation
  * Explains the problem and solution
  * API reference for all functions
  * Implementation details and performance notes
  * Testing instructions
  * Future enhancement ideas
This commit is contained in:
2026-01-28 18:10:29 +00:00
parent 66ffe17aed
commit 1944b43af8
3 changed files with 1996 additions and 0 deletions

File diff suppressed because it is too large Load Diff