Code Monkey home page Code Monkey logo

bigleague's People

Contributors

drewrip avatar

Watchers

 avatar

bigleague's Issues

add bracket to standings

The "playoffs" in our bigleague will be some kind of configurable bracket. We want to display a bracket based on the projected top finishers in the league.

This will require knowledge of the NFL state, specifically which week in the league it is.

make common settings configurable via config file

There are many basic settings that should be easily accessible and configurable. For instance, the address and port of the database, credentials for the database, max numbers of connections to the database, and details about the size of the bracket.

We need to decide on the format of the config file, and take out the hard coded values that are currently used.

rework database interface

Bigleague has a module, db, for common functionality and interactions with the Postgres database. This is becoming difficult to maintain and difficult to abstract just using tokio_postgres. Before introducing too much more complex behavior, this should really be rewritten to be more generic and safe, or use something like Diesel. My current plan is to implement Diesel.

matchups: show the current matchups for a user and their scores

The Sleeper API allows to grab a user's matchup for a given week with the endpoint:

GET https://api.sleeper.app/v1/league/<league_id>/matchups/<week>

Their documentation on this endpoint can be found here.

It would be nice to show a users future matchups and what the scores for their players.

add NFL season state to DB

In order to display the current week on the standings page, and correctly track the bracket in the future we need to know the state of the NFL season. This means we need to add a table to the DB and ensure we update the state regularly.

See the Sleeper docs for information about this query: https://docs.sleeper.com/#get-nfl-state

$ curl "https://api.sleeper.app/v1/state/nfl"
{
  "week": 2, // week
  "season_type": "regular", // pre, post, regular
  "season_start_date": "2020-09-10", // regular season start
  "season": "2020", // current season
  "previous_season": "2019",
  "leg": 2, // week of regular season
  "league_season": "2021", // active season for leagues
  "league_create_season": "2021", // flips in December
  "display_week": 3 // Which week to display in UI, can be different than week
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.