~josephjamesmills/+junk/americanFootball_api_stuff

« back to all changes in this revision

Viewing changes to Api/espn/HomeRss.qml.autosave

  • Committer: Joseph Mills
  • Date: 2013-12-15 15:25:28 UTC
  • Revision ID: josephjamesmills@gmail.com-20131215152528-vke40bcaabivhpm9
for dude to pull stuff out

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.0
 
2
import QtQuick.XmlListModel 2.0
 
3
 
 
4
 
 
5
// We can Keep a Eye on these  api also
 
6
//http://blog.programmableweb.com/2012/08/01/91-sports-apis-fanfeedr-seatwave-and-espn/
 
7
//http://football.myfantasyleague.com/
 
8
 
 
9
 
 
10
 
 
11
/*
 
12
******************************
 
13
** Fantasy Data
 
14
******************************
 
15
http://fantasydata.com/rss/rotoworld/
 
16
 
 
17
*/
 
18
/*
 
19
***************************
 
20
** Yahoo API
 
21
***************************
 
22
 
 
23
 
 
24
 
 
25
 
 
26
*/
 
27
 
 
28
 
 
29
 
 
30
/*
 
31
****************************
 
32
**     ESPN
 
33
****************************
 
34
 
 
35
 
 
36
Api Keys
 
37
ESPN  apikey=2h5sytpesd97v5fxmrfrkm7x
 
38
espn can be used for a couple of things.  First to get all the info about a player (id most important )
 
39
 
 
40
http://api.espn.com/v1/sports/football/nfl/athletes/?_accept=text%2Fxml&apikey=2h5sytpesd97v5fxmrfrkm7x
 
41
 
 
42
then we can use the id of the player to get things like there Picture
 
43
http://a.espncdn.com/combiner/i?img=/i/headshots/nfl/players/full/{PLAYERID}.png&w=350&h=254
 
44
 
 
45
we can also get there teams icon with
 
46
http://a1.espncdn.com/prod/assets/clubhouses/2010/nfl/bg_elements/teamlogos/{TEAM ABRIVE}.png
 
47
 
 
48
We can get the background for espn with the url
 
49
http://a1.espncdn.com/prod/assets/clubhouses/2010/nfl/bg_elements/SF.jpg
 
50
 
 
51
 
 
52
*/
 
53
/*
 
54
 
 
55
*******************************
 
56
**                NFL.COM
 
57
*******************************
 
58
 
 
59
api keys needed
 
60
 
 
61
applogin
 
62
http://api.fantasy.nfl.com/application/login?appKey=sampleapp&timestamp=1268089312&signature=c21bdddc4d4b33f1764c38b9200248d8
 
63
 
 
64
authLogin
 
65
http://api.fantasy.nfl.com/auth/login?appKey=sample&username=testuser&password=passtest&timestamp=1268089312&signature=c21bdddc4d4b33f1764c38b9200248d8
 
66
 
 
67
http://api.fantasy.nfl.com/league/players?leagueId=1&authToken=MTIzNCYxJjEyNjgwODg4NTY=     NEED API KEY
 
68
http://api.fantasy.nfl.com/league/schedule?leagueId=1&authToken=MTIzNCYxJjEyNjgwODg4NTY=
 
69
http://api.fantasy.nfl.com/league/settings?leagueId=1&authToken=MTIzNCYxJjEyNjgwODg4NTY=
 
70
http://api.fantasy.nfl.com/league/standings?leagueId=1&authToken=MTIzNCYxJjEyNjgwODg4NTY=
 
71
http://api.fantasy.nfl.com/league/messages?leagueId=1&authToken=MTIzNCYxJjEyNjgwODg4NTY=
 
72
http://api.fantasy.nfl.com/league/matchups?leagueId=1250&week=3&authToken=MTIzNCYxJjEyNjgwODg4NTY=
 
73
http://api.fantasy.nfl.com/league/transactions?leagueId=1&authToken=MTIzNCYxJjEyNjgwODg4NTY=
 
74
http://api.fantasy.nfl.com/league/team/roster?leagueId=1&teamId=1&week=4&authToken=MTIzNCYxJjEyNjgwODg4NTY=
 
75
http://api.fantasy.nfl.com/league/team/schedule?leagueId=1&teamId=1&authToken=MTIzNCYxJjEyNjgwODg4NTY=
 
76
http://api.fantasy.nfl.com/league/team/matchup?leagueId=1&teamId=1&week=4&authToken=MTIzNCYxJjEyNjgwODg4NTY=
 
77
http://api.fantasy.nfl.com/user/leagues?authToken=MTIzNCYxJjEyNjgwODg4NTY=
 
78
http://api.fantasy.nfl.com/user/notifications?authToken=MTIzNCYxJjEyNjgwODg4NTY=
 
79
 
 
80
 
 
81
 
 
82
 
 
83
 
 
84
**********NO KEY NEEDED***************
 
85
http://www.nfl.com/rss/rsslanding?searchString=gamehighlightsVideo  << game Highlights
 
86
http://www.nfl.com/liveupdate/scorestrip/ss.xml  << liveupdates of scores
 
87
 
 
88
http://api.fantasy.nfl.com/players/news << FF player News
 
89
http://api.fantasy.nfl.com/players/scoringleaders?season=2010&week=1    << player FF leaders by year
 
90
 
 
91
http://api.fantasy.nfl.com/leaderboard?siteId=34&count=10 << FF leaders
 
92
http://api.fantasy.nfl.com/players/editordraftranks  << FF draft ranking NFL editors
 
93
http://api.fantasy.nfl.com/players/userdraftranks  << by the User
 
94
http://api.fantasy.nfl.com/players/researchinfo  << sort list of top owned research
 
95
http://api.fantasy.nfl.com/players/news   << player News
 
96
http://api.fantasy.nfl.com/players/scoringleaders?season=2010&week=1
 
97
 
 
98
keep eye on this
 
99
http://api.fantasy.nfl.com/players/advanced?season=2012&week=1&count=1
 
100
*/
 
101
 
 
102
 
 
103
 
 
104
XmlListModel{
 
105
    source: "http://api.espn.com/v1/sports/football/nfl/athletes/?_accept=text%2Fxml&apikey=2h5sytpesd97v5fxmrfrkm7x"
 
106
    query: "/response/sports/sportsItem/leagues/leaguesItem/athletes/athletesItem"
 
107
 
 
108
    XmlRole{name:"id"; query: "id/string()"}
 
109
    XmlRole{name:"firstName"; query: "firstName/name/string()"}
 
110
    XmlRole{name:"lastName"; query: "lastName/string()"}
 
111
    XmlRole{name:"fullName"; query: "fullName/string()"}
 
112
    XmlRole{name:"displayName"; query: "displayName/string()"}
 
113
    XmlRole{name:"shortName"; query: "shortName/string()"}
 
114
    
 
115
    
 
116
    XmlRole{name:"playersUrl"; query: "links/api/athletes/string()"}
 
117
    XmlRole{name:"playersNews"; query: "links/api/athletes/news/string()"}
 
118
    XmlRole{name:"playerNotes"; query: "links/api/athletes/notes/string()"}
 
119
    XmlRole{name:"displayName"; query: "displayName/string()"}
 
120
    XmlRole{name:"displayName"; query: "displayName/string()"}
 
121
    XmlRole{name:"displayName"; query: "displayName/string()"}
 
122
shortName
 
123
 
 
124
    onStatusChanged: {
 
125
        if(status === XmlListModel.Loading){console.log("loading")}
 
126
        if(status === XmlListModel.Error){console.log("Error \t"+ errorString())}
 
127
 
 
128
        if(status === XmlListModel.Ready){
 
129
            console.log(count)
 
130
        }
 
131
 
 
132
 
 
133
 
 
134
    }
 
135
 
 
136
}