feat: adds matching markets for sports by date, ticker, or slug#7
feat: adds matching markets for sports by date, ticker, or slug#7
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds support for querying matching markets across sports prediction platforms (Polymarket and Kalshi) by date, ticker, or slug. The implementation provides both a general API and convenient sport-specific dynamic methods.
- Introduces
MatchingMarketsclass with filtering capabilities for sports markets - Adds custom type constraints for Polymarket slugs and Kalshi tickers
- Provides dynamic methods like
nfl_on(date)for each supported sport
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/domeapi/matching_markets.rb | Implements the MatchingMarkets API with Filter/SportsFilter contracts and dynamic sport-specific methods |
| lib/domeapi/types.rb | Defines custom Dry::Types constraints for Polymarket slugs and Kalshi tickers |
| lib/domeapi/client.rb | Adds matching_markets accessor method to the Client class |
| test/domeapi/matching_markets_test.rb | Provides comprehensive test coverage for sports filtering, date handling, and dynamic methods |
| Readme.adoc | Documents the new Matching Markets API with usage examples for sports queries |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| def matching_markets | ||
| @matching_markets ||= MatchingMarkets.new(self) | ||
| end |
There was a problem hiding this comment.
Missing test coverage for the new matching_markets method added to the Client class. Similar to the existing test for polymarket on line 32-34, there should be a test verifying that client.matching_markets returns an instance of Rubyists::Domeapi::MatchingMarkets.
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback. Make sure all of your commit messages and PR titles pass the Conventional Commits action check.
No description provided.