2
import QtQuick.XmlListModel 2.0
5
****************************
7
****************************
8
This is for Player IUnfo and stats along with Images and what not.
13
source: "http://api.espn.com/v1/sports/football/nfl/athletes/?_accept=text%2Fxml&apikey=2h5sytpesd97v5fxmrfrkm7x"
14
query: "/response/sports/sportsItem/leagues/leaguesItem/athletes/athletesItem"
16
XmlRole{name:"id"; query: "id/string()"}
17
XmlRole{name:"firstName"; query: "firstName/name/string()"}
18
XmlRole{name:"lastName"; query: "lastName/string()"}
19
XmlRole{name:"fullName"; query: "fullName/string()"}
20
XmlRole{name:"displayName"; query: "displayName/string()"}
21
XmlRole{name:"shortName"; query: "shortName/string()"}
23
XmlRole{name:"playersUrl"; query: "links/api/athletes/string()"}
24
XmlRole{name:"playersNews"; query: "links/api/athletes/news/string()"}
25
XmlRole{name:"playerNotes"; query: "links/api/athletes/notes/string()"}
28
if(status === XmlListModel.Loading){console.log("loading")}
29
if(status === XmlListModel.Error){console.log("Error \t"+ errorString())}
30
if(status === XmlListModel.Ready){
32
for(var i = 0 ; i < count ; i++){
33
console.log(nfo.get(i).id)