Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Summary
The new sports service runs independently of the racing service. It provides a way for users to get events and optionally filter by sport (Soccer, Basketball, etc) or by visible state, and order by advertised_start_time. The RPCs and repo methods are named as ListEvents and GetEvent to better allow for other resources to be added under sports later (replaced just List and Get compared to the racing service).
The ListEvents RPC uses a GET HTTP request to /v1/events with optional query param filter string which better follows Google's AIP-132 and AIP-160, compared to the racing service which uses a POST request to /v1/list-races and uses the request body to provide filtering.
Example
curl 'http://localhost:8000/v1/events?filter=sport%20in%20(%22Soccer%22%2C%20%22Basketball%22)&order_by=advertised_start_time%20desc'Without encoding:
curl 'http://localhost:8000/v1/events?filter=sport in ("Soccer", "Basketball")&order_by=advertised_start_time desc'Tests