Skip to content
A Wins Pool App for the NBA
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
api
nba_wins_pool
.gitignore
LICENSE
Procfile
README.md
manage.py
requirements.txt

README.md

NBA Wins Pool

Back in 2012, Bill Simmons came up with the idea for an NFL Wins Pool. Check out Bill's article for the basic idea. My friend John and I wanted to make this happen for the NBA. John made an iPhone app. This repository is the draft order logic that it pulls from.

Wins Pool Leaderboard

Rough API

/user/create
  Params:
    -> name (String)
  Returns:
    -> user_id (String)

/pool/size
  Returns:
    -> json.write('2', '3', '5', '6')

/pool/create
  Params:
    -> creator_id (Int)
    -> pool_size (Int)
    -> pool_name (String)
  Returns:
    -> pool_id (String)

/pool/status
  Returns:
    -> pool_status (Dict):
      {
        1 :
        [
          user: {id: "abc12324", name: "Jason Smith"},
          team (None if not drafted yet): {id: "atlanta-hawks", name: "Atlanta Hawks"} or None)
         ],
        2 :
        [
          user: {id: "xasarf3212", name: "Eric Smith"},
          team (None if not drafted yet): {id: "boston-celtics", name: "Boston Celtics"} or None)
         ]
         ...
      }

/pool/join
  Params:
    -> user_id (String)
    -> pool_id (String)
  Returns:
    -> success (Bool)

/pool/select
  Params:
    -> user_id (String)
    -> team_id (String)
  Returns:
    -> pool_status (Dict):
      {
        1 :
        [
          user: {id: "abc12324", name: "Jason Smith"},
          team (None if not drafted yet): {id: "atlanta-hawks", name: "Atlanta Hawks"} or None)
         ],
        2 :
        [
          user: {id: "xasarf3212", name: "Eric Smith"},
          team (None if not drafted yet): {id: "boston-celtics", name: "Boston Celtics"} or None)
         ]
         ...
      }

You can’t perform that action at this time.