Footy: Expand “odds” command to support all sports
sync-by-unito opened this issue · comments
The existing !footyodds
is currently limited to returning betting odds for a single league (EPL). The next iteration of this feature is to serve all major sports and handle the nuances of leagues-within-sports, with a focus on team moneyline & spread odds.
This shift to a manytomanytomany approach has several implications for the user experience, as well as changes to underlying logic.
User Interface
Users will be given the ability to fetch odds for the sport of their choice, with a single command dedicated per sport.
Tech Details
The “most relevant” leagues to serve within a given sport are to be determined via configuration. Users requesting odds markets for a given sport will be served markets belonging to a subset of predetermined leagues.
For a given event, both moneyline & spread odds are to be returned. The third-party API selected to power this feature must support both.
Handling prematch vs live odds remains an open question that is sure to add complexity. More advanced iterations of this feature may consider utilizing how odds of live events have deviated from prematch expectations.
To Do
- Settle on an API that best suits the relatively simple needs of this use case.
- Define a model of sports -> leagues
- Construct clear and simple responses for users
┆Issue is synchronized with this Jira Story