-
-
Save tolbard/2d101bb100789412a58e to your computer and use it in GitHub Desktop.
[{ | |
"type": "FOOTY", | |
"competition": "NRL", | |
"betType": "PICK_THE_WINNERS", | |
"stake": "$2.00", | |
"flexi": true, | |
"date": "2016-03-23", | |
"matches": [ | |
{"legs": [ | |
{"selections": ["H"]} | |
]}, | |
{"legs": [ | |
{"selections": ["H","A"]} | |
]}, | |
{"legs": [ | |
{"selections": ["A"]} | |
]}, | |
] | |
}, | |
{ | |
"type": "FOOTY", | |
"competition": "NRL", | |
"betType": "PICK_THE_SCORES", | |
"stake": "$1.00", | |
"flexi": false, | |
"date": "2016-03-23", | |
"matchNumber": 3, | |
"matches": [ | |
{"legs": [ | |
{"selections": [48]}, | |
{"selections": [0,1,2]} | |
]}, | |
] | |
}, | |
{ | |
"type": "FOOTY", | |
"competition": "NRL", | |
"betType": "PICK_THE_MARGINS", | |
"stake": "$3.00", | |
"flexi": false, | |
"date": "2016-03-23", | |
"matches": [ | |
{"legs": [ | |
{"selections": ["ALL"]} | |
]}, | |
{"legs": [ | |
{"selections": [0,1]} | |
]}, | |
{"legs": [ | |
{"selections": [4,5]} | |
]}, | |
] | |
}, | |
{ | |
"type": "FOOTY", | |
"competition": "AFL", | |
"betType": "PICK_THE_WINNERS", | |
"stake": "$2.00", | |
"flexi": true, | |
"date": "2016-03-23", | |
"matches": [ | |
{"legs": [ | |
{"selections": ["H","A"]} | |
]}, | |
{"legs": [ | |
{"selections": ["H","A"]} | |
]}, | |
{"legs": [ | |
{"selections": ["A"]} | |
]}, | |
] | |
}, | |
{ | |
"type": "FOOTY", | |
"competition": "AFL", | |
"betType": "PICK_THE_MARGINS", | |
"stake": "$3.00", | |
"flexi": false, | |
"date": "2016-03-23", | |
"matches": [ | |
{"legs": [ | |
{"selections": ["ALL"]} | |
]}, | |
{"legs": [ | |
{"selections": [0,"MYSTERY"]} | |
]}, | |
{"legs": [ | |
{"selections": [4,5]} | |
]}, | |
] | |
}, | |
{ | |
"type": "FOOTY", | |
"competition": "AFL", | |
"betType": "WIN", | |
"stake": "$3.00", | |
"flexi": false, | |
"date": "2016-03-23", | |
"matchNumber": 3, | |
"matches": [ | |
{"legs": [ | |
{"selections": [1,2]} | |
]} | |
] | |
}, | |
{ | |
"type": "FOOTY", | |
"competition": "AFL", | |
"betType": "QUAD", | |
"stake": "$0.50", | |
"flexi": false, | |
"date": "2016-03-23", | |
"matches": [ | |
{"legs": [ | |
{"selections": [1,2]} | |
]}, | |
{"legs": [ | |
{"selections": [7,8,9]} | |
]}, | |
{"legs": [ | |
{"selections": [16]} | |
]}, | |
{"legs": [ | |
{"selections": [3,4]} | |
]}, | |
] | |
}, | |
{ | |
"type": "FOOTY", | |
"competition": "AFL", | |
"betType": "QUARTER_QUAD", | |
"stake": "$3.50", | |
"flexi": false, | |
"date": "2016-03-23", | |
"matches": [ | |
{"legs": [ | |
{"selections": [2,3]} | |
{"selections": [3]}, | |
{"selections": [1]}, | |
{"selections": [8]} | |
]}, | |
] | |
}, | |
{ | |
"type": "FOOTY", | |
"competition": "AFL", | |
"betType": "DOUBLE", | |
"stake": "$3.50", | |
"date": "2016-03-21", | |
"matches": [ | |
{"legs": [ | |
{"selections": [2,3]} | |
]}, | |
{"legs": [ | |
{"selections": [3,4]} | |
]} | |
] | |
}, | |
{ | |
"type": "FOOTY", | |
"competition": "AFL", | |
"betType": "HALF_DOUBLE", | |
"stake": "$1.50", | |
"flexi": false, | |
"date": "2016-03-20", | |
"matches": [ | |
{"legs": [ | |
{"selections": [10]}, | |
{"selections": [12]} | |
]}, | |
] | |
}, | |
{ | |
"type": "FOOTY", | |
"competition": "AFL", | |
"betType": "XTRA_DOUBLE", | |
"stake": "$3.50", | |
"flexi": false, | |
"date": "2016-03-23", | |
"matches": [ | |
{"legs": [ | |
{"selections": [2,3]} | |
]}, | |
{"legs": [ | |
{"selections": [3,4]} | |
]} | |
] | |
}, | |
{ | |
"type": "FOOTY", | |
"competition": "AFL", | |
"betType": "HALF_XTRA_DOUBLE", | |
"stake": "$1.50", | |
"flexi": false, | |
"date": "2016-03-13", | |
"matches": [ | |
{"legs": [ | |
{"selections": [10]}, | |
{"selections": [12]} | |
]}, | |
] | |
} | |
] |
A not generic method make it more difficult to do things like "bet.hasMystery"
@nguyenchr @vickvu I add the generic examples in the end of the gist
Generic version, but no periods
ie
{
"type": "FOOTY",
"venueCode": "C",
"betType": "PICK_THE_MARGINS",
"stake": "$3.00",
"flexi": false,
"matchLegs": [
["ALL"],
[0,1],
[4,5]
]
},
Without periods would actually look like:
{
"type": "FOOTY",
"venueCode": "C",
"betType": "PICK_THE_MARGINS",
"stake": "$3.00",
"flexi": false,
"matchLegs": [
[["ALL"]],
[[0,1]],
[[4,5]]
]
},
My understanding is that 'matchLegs' actually corresponds to a 'race' in the parimutuel racing analogy.
How about we just call this 'match'?
Then each 'period' is actually the 'leg' of that 'match' (corresponding to leg of a racing bet)?
{
"type": "FOOTY",
"venueCode": "F",
"betType": "FOOTY_QUAD",
"stake": "$0.50",
"flexi": false,
"matches": [
{"legs": [
{"selections": [1,2]}
]},
{"legs": [
{"selections": [7,8,9]}
]},
{"legs": [
{"selections": [16]}
]},
{"legs": [
{"selections": [3,4]}
]},
]
},
do we have to keep the name venueCode
, may be we should rename venueCode
to something more meaningful?
@vickvu I agree, have a look at my first comment, I called it sportType
not sure whether that is better or not?
@nguyenchr @vickvu what do you think about betTypeGroup
@nguyenchr After I read again you first comment I got It. I can use sportType
: "NRL" or "AFL"
instead of sportType
why not use competiton
as "NRL" and "AFL" are sport competition
{
"type": "FOOTY",
"competition": "NRL",
"betType": "PICK_THE_MARGINS",
"stake": "$3.00",
"flexi": false,
"matches": [
["ALL"],
[0,1],
[4,5]
]
},
s/matchs/matches/ :)
@tolbard lets explore a few different options in this gist
see what it looks like to be generic? and add to this gist, but dont remove the other examples, and then we can compare