mlb
object
#
mlb : Operations for MLB.
Kind: global namespace
- mlb :
object
#
mlb.getPlayByPlay(id) โGets the MLB game play-by-play data for a specified game.
Kind: static method of mlb
Returns: json
Param | Type | Description |
---|---|---|
id | number | Game id. |
Example
const result = await sdv.mlb.getPlayByPlay(401472105);
#
mlb.getBoxScore(id) โGets the MLB game box score data for a specified game.
Kind: static method of mlb
Returns: json
Param | Type | Description |
---|---|---|
id | number | Game id. |
Example
const result = await sdv.mlb.getBoxScore(401472105);
#
mlb.getSummary(id) โGets the MLB game summary data for a specified game.
Kind: static method of mlb
Returns: json
Param | Type | Description |
---|---|---|
id | number | Game id. |
Example
const result = await sdv.mlb.getSummary(401472105);
#
mlb.getPicks(id) โGets the MLB game PickCenter data for a specified game.
Kind: static method of mlb
Returns: json
Param | Type | Description |
---|---|---|
id | number | Game id. |
Example
const result = await sdv.mlb.getPicks(401472105);
#
mlb.getSchedule(year, month, day) โGets the MLB schedule data for a specified date if available.
Kind: static method of mlb
Returns: json
Param | Type | Description |
---|---|---|
year | * | Year (YYYY) |
month | * | Month (MM) |
day | * | Day (DD) |
Example
const result = await sdv.mlb.getSchedule(year = 2016, month = 04, day = 15)
#
mlb.getScoreboard(year, month, day, limit) โGets the MLB scoreboard data for a specified date if available.
Kind: static method of mlb
Returns: json
Param | Type | Description |
---|---|---|
year | * | Year (YYYY) |
month | * | Month (MM) |
day | * | Day (DD) |
limit | number | Limit on the number of results @default 300 |
Example
const result = await sdv.mlb.getScoreboard(year = 2019, month = 11, day = 16)
#
mlb.getStandings(year, group) โGets the team standings for the MLB.
Kind: static method of mlb
Returns: json
Param | Type | Description |
---|---|---|
year | number | Season |
group | string | acceptable group names: 'league','conference','division' |
Example
const yr = 2016;const result = await sdv.mlb.getStandings(year = yr);
#
mlb.getTeamList() โGets the list of all MLB teams their identification info for ESPN.
Kind: static method of mlb
Returns: json
Example
const result = await sdv.mlb.getTeamList();
#
mlb.getTeamInfo(id) โGets the team info for a specific MLB team.
Kind: static method of mlb
Returns: json
Param | Type | Description |
---|---|---|
id | number | Team Id |
Example
const teamId = 16;const result = await sdv.mlb.getTeamInfo(teamId);
#
mlb.getTeamPlayers(id) โGets the team roster information for a specific MLB team.
Kind: static method of mlb
Returns: json
Param | Type | Description |
---|---|---|
id | number | Team Id |
Example
const teamId = 16;const result = await sdv.mlb.getTeamPlayers(teamId);