Skip to content

Feature: Voting Statistics API#1834

Open
SeradedStripes wants to merge 8 commits intohackclub:mainfrom
SeradedStripes:voting-api
Open

Feature: Voting Statistics API#1834
SeradedStripes wants to merge 8 commits intohackclub:mainfrom
SeradedStripes:voting-api

Conversation

@SeradedStripes
Copy link
Copy Markdown

@SeradedStripes SeradedStripes commented Mar 19, 2026

This PR adds voting statistics endpoints to the API
Closes #1723

image

@SeradedStripes SeradedStripes marked this pull request as ready for review March 19, 2026 16:55
Copilot AI review requested due to automatic review settings March 19, 2026 16:55
@SeradedStripes SeradedStripes changed the title Feature: Voting API Feature: Voting Statistics API Mar 19, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces new /api/v1/votes/* endpoints intended to expose voting analytics/statistics via the existing API-key authenticated v1 API, addressing the need from #1723 to fetch aggregated vote stats without scraping Slack.

Changes:

  • Adds new v1 routes for vote stats/results/records/global endpoints.
  • Implements Api::V1::VotesController actions to return aggregated stats, per-project aggregated results, and vote record feeds.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.

File Description
config/routes.rb Adds new /api/v1/votes/* GET routes for the voting API.
app/controllers/api/v1/votes_controller.rb Implements JSON responses for stats, results, records, and global vote retrieval.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread app/controllers/api/v1/votes_controller.rb Outdated
Comment thread app/controllers/api/v1/votes_controller.rb
Comment thread app/controllers/api/v1/votes_controller.rb
Comment thread app/controllers/api/v1/votes_controller.rb
Comment thread app/controllers/api/v1/votes_controller.rb Outdated
Comment thread config/routes.rb
Comment thread config/routes.rb
@SeradedStripes SeradedStripes marked this pull request as draft March 19, 2026 17:17
@SeradedStripes SeradedStripes marked this pull request as ready for review March 19, 2026 17:19
Copy link
Copy Markdown
Member

@NeonGamerBot-QK NeonGamerBot-QK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing a jbuilder file? (we use jbuilder with the api)

@abinnovator
Copy link
Copy Markdown

please add ts I need it for ft mobile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Suggestion] API endpoint for voting pool analytics

4 participants