tba 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tba.rb +27 -27
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e553c055c729feb22fedb53af7cbfb7800a90b0d
|
|
4
|
+
data.tar.gz: 13835e1e849d6901498e3e7e584b24c74ab19739
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e4e28a357b467ecb2c203f8af926132f5a7ae221d4a76dc73b4584ae9a3255975c4fe5fd85297593967cf798e3e1bad62e12040a0354e5ce50a7d41ec84a7e70
|
|
7
|
+
data.tar.gz: b02748a6567923c3a8cd94242654f7eac67469b5d606a9dca7b6d0652f314c4975d873e70e567714798dcf96d85870f1d2ee6de0d2e18394ca73a2f2874ff335
|
data/lib/tba.rb
CHANGED
|
@@ -17,112 +17,112 @@ class TBA
|
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
def get_teams(index)
|
|
20
|
-
fetch(
|
|
20
|
+
fetch("teams/#{index}")
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
def get_team(team)
|
|
24
|
-
fetch(
|
|
24
|
+
fetch("team/frc#{team}")
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
def get_team_events(team, year)
|
|
28
|
-
fetch(
|
|
28
|
+
fetch("team/frc#{team}/#{year}")
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def get_team_awards(team, *event)
|
|
32
32
|
if event[0]
|
|
33
|
-
fetch(
|
|
33
|
+
fetch("team/frc#{team}/event/#{event[0]}/awards")
|
|
34
34
|
else
|
|
35
|
-
fetch(
|
|
35
|
+
fetch("team/frc#{team}")
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
38
|
|
|
39
39
|
def get_team_matches(team, event)
|
|
40
|
-
fetch(
|
|
40
|
+
fetch("team/frc#{team}/event/#{event}/matches")
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
def get_team_years(team)
|
|
44
|
-
fetch(
|
|
44
|
+
fetch("team/frc#{team}/years_participated")
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
def get_team_media(team, *year)
|
|
48
48
|
if year[0]
|
|
49
|
-
fetch(
|
|
49
|
+
fetch("team/frc#{team}/#{year[0]}/media")
|
|
50
50
|
else
|
|
51
|
-
fetch(
|
|
51
|
+
fetch("team/frc#{team}/media")
|
|
52
52
|
end
|
|
53
53
|
end
|
|
54
54
|
|
|
55
55
|
def get_team_history_events(team)
|
|
56
|
-
fetch(
|
|
56
|
+
fetch("team/frc#{team}/history/events")
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
def get_team_history_awards(team)
|
|
60
|
-
fetch(
|
|
60
|
+
fetch("team/frc#{team}/history/awards")
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
def get_team_history_robots(team)
|
|
64
|
-
fetch(
|
|
64
|
+
fetch("team/frc#{team}/history/robots")
|
|
65
65
|
end
|
|
66
66
|
|
|
67
67
|
def get_team_history_districts(team)
|
|
68
|
-
fetch(
|
|
68
|
+
fetch("team/frc#{team}/history/districts")
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
def get_event_list(*year)
|
|
72
72
|
if year[0]
|
|
73
|
-
fetch(
|
|
73
|
+
fetch("events/#{year}")
|
|
74
74
|
else
|
|
75
|
-
fetch(
|
|
75
|
+
fetch("events/")
|
|
76
76
|
end
|
|
77
77
|
end
|
|
78
78
|
|
|
79
79
|
def get_event(event)
|
|
80
|
-
fetch(
|
|
80
|
+
fetch("event/#{event}")
|
|
81
81
|
end
|
|
82
82
|
|
|
83
83
|
def get_event_teams(event)
|
|
84
|
-
fetch(
|
|
84
|
+
fetch("event/#{event}/teams")
|
|
85
85
|
end
|
|
86
86
|
|
|
87
87
|
def get_event_stats(event)
|
|
88
|
-
fetch(
|
|
88
|
+
fetch("event/#{event}/stats")
|
|
89
89
|
end
|
|
90
90
|
|
|
91
91
|
def get_event_rankings(event)
|
|
92
|
-
fetch(
|
|
92
|
+
fetch("event/#{event}/rankings")
|
|
93
93
|
end
|
|
94
94
|
|
|
95
95
|
def get_event_awards(event)
|
|
96
|
-
fetch(
|
|
96
|
+
fetch("event/#{event}/awards")
|
|
97
97
|
end
|
|
98
98
|
|
|
99
99
|
def get_event_matches(event)
|
|
100
|
-
fetch(
|
|
100
|
+
fetch("event/#{event}/matches")
|
|
101
101
|
end
|
|
102
102
|
|
|
103
103
|
def get_district_points(event)
|
|
104
|
-
fetch(
|
|
104
|
+
fetch("event/#{event}/district_points")
|
|
105
105
|
end
|
|
106
106
|
|
|
107
107
|
# TODO: Make this a bit more accessible. Add automatic key generation, etc.
|
|
108
108
|
def get_match(match)
|
|
109
|
-
fetch(
|
|
109
|
+
fetch("match/#{match}")
|
|
110
110
|
end
|
|
111
111
|
|
|
112
112
|
def get_districts(year)
|
|
113
|
-
fetch(
|
|
113
|
+
fetch("districts/#{year}")
|
|
114
114
|
end
|
|
115
115
|
|
|
116
116
|
def get_district_events(district, year)
|
|
117
|
-
fetch(
|
|
117
|
+
fetch("district/#{district}/#{year}/events")
|
|
118
118
|
end
|
|
119
119
|
|
|
120
120
|
def get_district_rankings(district, year)
|
|
121
|
-
fetch(
|
|
121
|
+
fetch("district/#{district}/#{year}/rankings")
|
|
122
122
|
end
|
|
123
123
|
|
|
124
124
|
def get_district_teams(district, year)
|
|
125
|
-
fetch(
|
|
125
|
+
fetch("district/#{district}/#{year}/teams")
|
|
126
126
|
end
|
|
127
127
|
|
|
128
128
|
end
|