To import data into MyFantasyLeague.com:
- You're now importing data for the 2008 season. If you'd like to import data for another season, simply change the URL above from http://football.myfantasyleague.com/2008/import to another 4-digit year.
- Select the data type you're importing (detailed explanations of the data types follow).
- Enter the 5-digit league id of the league you're importing data for.
- Press the "Import" button.
- Note: To prevent either intentional or unintentional abuse of this facility, we're limiting you to 5000 requests of this program per league in any given rolling 24 hour period.
- Much more data can be exported from MyFantasyLeague.com - see our export
program documentation for more details.
- Data types above that specify "Login Required" require you to first programmatically log into the site using the login program. The basic sequence of steps is this:
- Prompt for the customer's franchise id, and password - you might want to do this similar to how we do it on the login page.
- Programmatically call http://football19.myfantasyleague.com/2008/login?L=28923&FRANCHISE_ID=0001&PASSWORD=testing&XML=1, passing in a valid league id (L parameter), franchise id and password.
- If valid information is passed into the login program, the response will include a <status session_id="session_identifier_here"...>.
- If invalid information is passed into the login program, it will respond with an <error... status message.
- The above session identifier should be passed back in as via a standard HTTP header cookie in the format: "Cookie: USER_ID=session_identifier_here" in any subsequent calls to the import program.
Details Regarding Data Types Available:
- franchises:
Franchise names, grapics, contact information, and more. All franchise information that is not passed in as a parameter is erased from the old franchise. Sample Document (ignore all but the 'franchises' section).
- draftResults:
Draft order and actual draft results. All previously existing draft results will be completely deleted from the system when importing draft results. Sample Document.
- auctionResults:
Auction results. All previously existing auction results will be completely deleted from the system when importing auction results. Sample Document.
- salaries:
All player salaries. All previously existing player salaries will be completely deleted from the system when importing player salaries. Sample Document. If you'd only like to append new salaries to a league, and not over-write all existing salaries, pass in the "APPEND=1" parameter.
- messageBoard:
A reply to an existing message board thread, or, a post for a new message board. To reply to an existing message board thread, the required parameters are THREAD and BODY, like http://football19.myfantasyleague.com/2010/import?L=28923&TYPE=messageBoard&THREAD=2191314&BODY=test+post+to+add+a+reply+to+thread. To create a new message board thread, the required parameters are SUBJECT and BODY, like http://football19.myfantasyleague.com/2010/import?L=28923&TYPE=messageBoard&SUBJECT=new+message+board+thread&BODY=test+post+to+add+a+new+message+board+thread.
- lineup:
Placeholder for importing a starting lineup. If you'd like to see this actually work, let us know!