auths
objectreturn
or this.key = 'value'
, pass input data to your code viaparams
, and maintain state across executions with$checkpoint.async
(event, steps) => {
}
//this node.js code will execute when your workflow is triggered
const { Client } = require('espn-fantasy-football-api/node')
const myClient = new Client({ leagueId: 671908 });
console.log(`${process.env.YOUR_ESPN_S3}`)
myClient.setCookies({ espnS2: `${process.env.YOUR_ESPN_S3}`, SWID: `${process.env.YOUR_SWID}` });
const myTeams = await myClient.getFreeAgents({ seasonId: 2019, scoringPeriodId: 1 })
console.log(myTeams)