Skip to content

(Task 4) Feature: get Race by ID - #4

Open
Cuttsy27 wants to merge 2 commits into
feature/race-status-fieldfrom
feature/get-race-by-id
Open

Cuttsy27 wants to merge 2 commits into
feature/race-status-fieldfrom
feature/get-race-by-id

Conversation

@Cuttsy27

@Cuttsy27 Cuttsy27 commented Aug 3, 2025

Copy link
Copy Markdown
Owner

Changes

  • added GetRace rpc and GetRaceRequest message
  • added base SQL query for get race
  • added Get method to races repo interface and implemented
  • added tests for new get race service

Summary

Adding the new GetRace RPC means users can retrieve just the race they want by providing the Race ID. This will improve performance where only a single Race is required by reducing time spent filtering and reducing bytes sent between client and server. The GetRace RPC and GetRaceRequest message follow Google's AIP-131 Standard Methods: Get by using the HTTP GET verb for the request, using /races/{id} hierarchical format, and expecting a single parameter (id) to retrieve the resource. It also follows syntax-specific requirements such as the RPC name beginning with "Get", the RPC returning the resource type "Race" directly (not "RaceResponse" or similar), and naming the message "RaceRequest".

Example

curl -X "GET" "http://localhost:8000/v1/races/1" \
     -H 'Content-Type: application/json'

Tests

  • added racing service tests for the new GetRace functionality

@Cuttsy27 Cuttsy27 changed the title Feature: Get Race by ID Feature: get Race by ID Aug 4, 2025
@Cuttsy27 Cuttsy27 changed the title Feature: get Race by ID (Task 4) Feature: get Race by ID Aug 4, 2025
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.

1 participant