Retrieve analysis on a players draft results.
const YahooFantasy = require('yahoo-fantasy');
const yf = new YahooFantasy(
Y!APPLICATION_KEY,
Y!APPLICATION_SECRET,
tokenCallbackFn, // optional
redirectUri // optional
);
yf.setUserToken(
Y!OAuthAccessToken
);
// promise based
try {
const draft_analysis = await yf.player.draft_analysis(player_key);
} catch (e) {
// handle error
}
// callback based
yf.player.draft_analysis(player_key, callbackFn);
{
"player_key": "328.p.6619",
"player_id": "6619",
"name": {
"full": "Albert Pujols",
"first": "Albert",
"last": "Pujols",
"ascii_first": "Albert",
"ascii_last": "Pujols"
},
"editorial_player_key": "mlb.p.6619",
"editorial_team_key": "mlb.t.3",
"editorial_team_full_name": "Los Angeles Angels",
"editorial_team_abbr": "LAA",
"uniform_number": "5",
"display_position": "1B",
"headshot": "http://l.yimg.com/iu/api/res/1.2/iium.CfIaaN.XDy7fB4Reg--/YXBwaWQ9eXZpZGVvO…g--/http://l.yimg.com/j/assets/i/us/sp/v/mlb/players_l/20130405/6619.1.jpg",
"is_undroppable": "0",
"position_type": "B",
"eligible_positions": [
"1B",
"CI",
"DH",
"IF"
],
"draft_analysis": {
"average_pick": "44.7",
"average_round": "4.6",
"average_cost": "23.4",
"percent_drafted": "1.00"
}
}