-
Notifications
You must be signed in to change notification settings - Fork 2
/
test.py
78 lines (70 loc) · 2.1 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
from pprint import pprint
from getpass import getpass
from bookie_lookup.eventgroup import LookupEventGroup
if __name__ == "__main__":
eventgroup = LookupEventGroup("AmericanFootball", "NFL#RegSeas")
eventgroup.peerplays.wallet.unlock("posaune")
eventgroup.sport.update()
eventgroup.update()
# Rules
for r in eventgroup.sport.rules:
r.update()
pprint(dict(eventgroup))
for event in eventgroup.events:
print("EVENT")
print("=" * 80)
pprint(dict(event))
# event.update()
for bmg in event.bettingmarketgroups:
print("BMG")
print("=" * 80)
# bmg.update()
# pprint(dict(bmg.items()))
for bm in bmg.bettingmarkets:
print("BM")
print("=" * 80)
pprint(dict(bm))
# bm.update()
# pprint(dict(bm.items()))
break
break
break
pprint(eventgroup.proposal_buffer.json())
# eventgroup.broadcast()
"""
w = WitnessLookup()
w.peerplays.wallet.unlock(getpass())
w.peerplays.nobroadcast = True
w.peerplays.bundle = True
# for sport in w.list_sports():
sport = WitnessLookupSport("Football")
sport.update()
for e in sport.eventgroups:
e.update()
for r in sport.rules:
r.update()
w.broadcast()
"""
"""
for b in sport.bettingmarketgroups:
b.update()
for p in sport.participants:
p.update()
"""
"""
# sport.update()
# eventgroup = WitnessLookupEventGroup("AmericanFootball", "NFL#PreSeas")
# eventgroup.update()
"""
"""
print(json.dumps(w, indent=4))
print(json.dumps(w.data, indent=4))
print(w.list_sports())
print(WitnessLookupSport("AmericanFootball"))
print(WitnessLookupEventGroup("AmericanFootball", "NFL#PreSeas"))
print(WitnessLookupBettingMarketGroup(
"AmericanFootball", "NFL_HCP_2017-18_1")
)
print(WitnessLookupParticipants("AmericanFootball", "NFL_Teams_2017-18"))
print(WitnessLookupRules("AmericanFootball", "R_NFL_MO_1"))
"""