~josephjamesmills/+junk/americanFootball_api_stuff

« back to all changes in this revision

Viewing changes to Api/nfl.com/NLiveScores.qml

  • 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
XmlListModel{
 
4
    source: "http://www.nfl.com/liveupdate/scorestrip/ss.xml"
 
5
    query: "/ss/gms/g"
 
6
    XmlRole{name:"homeTeam"; query: "@hnn/string()"}
 
7
    XmlRole{name:"awayTeam"; query: "@vnn/string()"}
 
8
    XmlRole{name:"hAbrev"; query: "@h/string()"}
 
9
    XmlRole{name:"aAbrev"; query: "@v/string()"}
 
10
 
 
11
    XmlRole{name:"homeScore"; query: "@hs/string()"}
 
12
    XmlRole{name:"awayScore"; query: "@vs/string()"}
 
13
 
 
14
    XmlRole{name:"stateOfGame"; query: "@q/string()"}
 
15
    XmlRole{name:"dayOfGame"; query: "@d/string()"}
 
16
    XmlRole{name:"timeOfGame"; query: "@t/string()"}
 
17
 
 
18
    XmlRole{name:"gameType"; query: "@gt/string()"}
 
19
    XmlRole{name:"redZone"; query: "@rz/string()"}
 
20
 
 
21
    onStatusChanged: {
 
22
        if(status === XmlListModel.Loading){console.log("loading")}
 
23
        if(status === XmlListModel.Error){console.log("Error \t"+ errorString())}
 
24
        if(status === XmlListModel.Ready){
 
25
            console.log(count)
 
26
        }
 
27
    }
 
28
}