Namespace core.league
Creating and removing leagues.
Defined in: <js/core/league.js>.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
<static> |
core.league.create(name, tid, playerGeneration, cb)
Create a new league.
|
<static> |
core.league.export_(lid, cb)
Export an existing league.
|
<static> |
core.league.remove(lid, cb)
Delete an existing league.
|
Method Detail
<static>
core.league.create(name, tid, playerGeneration, cb)
Create a new league.
- Parameters:
- {string} name
- The name of the league.
- {number} tid
- The team ID for the team the user wants to manage.
- {string} playerGeneration
- Either "random" to generate random players or "nba2012" to load NBA rosters.
- cb
<static>
core.league.export_(lid, cb)
Export an existing league.
- Parameters:
- {number} lid
- League ID.
- {function(Object)} cb
- Callback whose first argument contains all the exported league data.
<static>
core.league.remove(lid, cb)
Delete an existing league.
- Parameters:
- {number} lid
- League ID.
- {function()=} cb
- Optional callback.