Retrieve basic meta information about a team. Users must be authenticated and a member of the league to query against teams of private leagues.
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 meta = await yf.team.meta(team_key);
} catch (e) {
// handle error
}
// callback based
yf.team.meta(team_key, callbackFn);
{
"team_key": "328.l.34014.t.1",
"team_id": "1",
"name": "ChicksDigTheLongBall",
"url": "http://baseball.fantasysports.yahoo.com/b1/34014/1",
"team_logo": "http://l.yimg.com/dh/ap/fantasy/img/mlb/icon_6_lg.gif",
"waiver_priority": 4,
"number_of_moves": "19",
"number_of_trades": 0,
"clinched_playoffs": 1,
"managers": [
{
"manager_id": "1",
"nickname": "--hidden--",
"guid": "RYWP7M53IC626MGOX36ZWCM4FA",
"is_commissioner": "1"
}
]
}