sports-odds-api 1.2.2 → 1.3.0
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/CHANGELOG.md +38 -0
- data/README.md +11 -1
- data/lib/sports_odds_api/client.rb +28 -1
- data/lib/sports_odds_api/internal/transport/base_client.rb +5 -0
- data/lib/sports_odds_api/internal/transport/pooled_net_requester.rb +13 -11
- data/lib/sports_odds_api/internal/util.rb +61 -10
- data/lib/sports_odds_api/models/event.rb +197 -4
- data/lib/sports_odds_api/models/event_get_params.rb +22 -4
- data/lib/sports_odds_api/models/market.rb +206 -0
- data/lib/sports_odds_api/models/market_get_params.rb +150 -0
- data/lib/sports_odds_api/models/player_get_params.rb +3 -3
- data/lib/sports_odds_api/models/team.rb +107 -2
- data/lib/sports_odds_api/models/team_get_params.rb +3 -3
- data/lib/sports_odds_api/models.rb +4 -0
- data/lib/sports_odds_api/resources/account.rb +1 -0
- data/lib/sports_odds_api/resources/events.rb +11 -3
- data/lib/sports_odds_api/resources/leagues.rb +3 -1
- data/lib/sports_odds_api/resources/markets.rb +87 -0
- data/lib/sports_odds_api/resources/players.rb +4 -2
- data/lib/sports_odds_api/resources/sports.rb +1 -0
- data/lib/sports_odds_api/resources/stats.rb +3 -1
- data/lib/sports_odds_api/resources/stream.rb +3 -1
- data/lib/sports_odds_api/resources/teams.rb +4 -2
- data/lib/sports_odds_api/version.rb +1 -1
- data/lib/sports_odds_api.rb +3 -0
- data/rbi/sports_odds_api/client.rbi +12 -0
- data/rbi/sports_odds_api/internal/util.rbi +29 -1
- data/rbi/sports_odds_api/models/event.rbi +387 -3
- data/rbi/sports_odds_api/models/event_get_params.rbi +30 -4
- data/rbi/sports_odds_api/models/market.rbi +326 -0
- data/rbi/sports_odds_api/models/market_get_params.rbi +224 -0
- data/rbi/sports_odds_api/models/player_get_params.rbi +4 -4
- data/rbi/sports_odds_api/models/team.rbi +186 -3
- data/rbi/sports_odds_api/models/team_get_params.rbi +4 -4
- data/rbi/sports_odds_api/models.rbi +4 -0
- data/rbi/sports_odds_api/resources/account.rbi +1 -0
- data/rbi/sports_odds_api/resources/events.rbi +11 -2
- data/rbi/sports_odds_api/resources/leagues.rbi +1 -0
- data/rbi/sports_odds_api/resources/markets.rbi +79 -0
- data/rbi/sports_odds_api/resources/players.rbi +3 -2
- data/rbi/sports_odds_api/resources/sports.rbi +1 -0
- data/rbi/sports_odds_api/resources/stats.rbi +1 -0
- data/rbi/sports_odds_api/resources/stream.rbi +1 -0
- data/rbi/sports_odds_api/resources/teams.rbi +3 -2
- data/sig/sports_odds_api/client.rbs +2 -0
- data/sig/sports_odds_api/internal/util.rbs +14 -0
- data/sig/sports_odds_api/models/event.rbs +246 -3
- data/sig/sports_odds_api/models/event_get_params.rbs +14 -0
- data/sig/sports_odds_api/models/market.rbs +186 -0
- data/sig/sports_odds_api/models/market_get_params.rbs +133 -0
- data/sig/sports_odds_api/models/team.rbs +130 -3
- data/sig/sports_odds_api/models.rbs +4 -0
- data/sig/sports_odds_api/resources/events.rbs +2 -0
- data/sig/sports_odds_api/resources/markets.rbs +27 -0
- metadata +39 -2
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module SportsOddsAPI
|
|
4
|
+
module Models
|
|
5
|
+
class Market < SportsOddsAPI::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(SportsOddsAPI::Market, SportsOddsAPI::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# The number of unique active events with available odds for this market across
|
|
12
|
+
# all supported league and bookmaker combinations.
|
|
13
|
+
sig { returns(T.nilable(Float)) }
|
|
14
|
+
attr_reader :active_events
|
|
15
|
+
|
|
16
|
+
sig { params(active_events: Float).void }
|
|
17
|
+
attr_writer :active_events
|
|
18
|
+
|
|
19
|
+
# The type of bet
|
|
20
|
+
sig { returns(T.nilable(String)) }
|
|
21
|
+
attr_reader :bet_type_id
|
|
22
|
+
|
|
23
|
+
sig { params(bet_type_id: String).void }
|
|
24
|
+
attr_writer :bet_type_id
|
|
25
|
+
|
|
26
|
+
# True if this is a sub-period of a main market
|
|
27
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
28
|
+
attr_reader :is_main_derivative
|
|
29
|
+
|
|
30
|
+
sig { params(is_main_derivative: T::Boolean).void }
|
|
31
|
+
attr_writer :is_main_derivative
|
|
32
|
+
|
|
33
|
+
# True if this is a main market
|
|
34
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
35
|
+
attr_reader :is_main_market
|
|
36
|
+
|
|
37
|
+
sig { params(is_main_market: T::Boolean).void }
|
|
38
|
+
attr_writer :is_main_market
|
|
39
|
+
|
|
40
|
+
# True if this is a prop bet
|
|
41
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
42
|
+
attr_reader :is_prop
|
|
43
|
+
|
|
44
|
+
sig { params(is_prop: T::Boolean).void }
|
|
45
|
+
attr_writer :is_prop
|
|
46
|
+
|
|
47
|
+
# True if this market is for a sub-period
|
|
48
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
49
|
+
attr_reader :is_sub_period
|
|
50
|
+
|
|
51
|
+
sig { params(is_sub_period: T::Boolean).void }
|
|
52
|
+
attr_writer :is_sub_period
|
|
53
|
+
|
|
54
|
+
# True if this market is supported by at least one league/bookmaker.
|
|
55
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
56
|
+
attr_reader :is_supported
|
|
57
|
+
|
|
58
|
+
sig { params(is_supported: T::Boolean).void }
|
|
59
|
+
attr_writer :is_supported
|
|
60
|
+
|
|
61
|
+
# The unique identifier for the group (all sides of the market) this market
|
|
62
|
+
# belongs to
|
|
63
|
+
sig { returns(T.nilable(String)) }
|
|
64
|
+
attr_reader :market_group_id
|
|
65
|
+
|
|
66
|
+
sig { params(market_group_id: String).void }
|
|
67
|
+
attr_writer :market_group_id
|
|
68
|
+
|
|
69
|
+
# The primary display name for this market's group
|
|
70
|
+
sig { returns(T.nilable(String)) }
|
|
71
|
+
attr_reader :market_group_name
|
|
72
|
+
|
|
73
|
+
sig { params(market_group_name: String).void }
|
|
74
|
+
attr_writer :market_group_name
|
|
75
|
+
|
|
76
|
+
# An alternative display name for this market's group
|
|
77
|
+
sig { returns(T.nilable(String)) }
|
|
78
|
+
attr_reader :market_group_name_alias
|
|
79
|
+
|
|
80
|
+
sig { params(market_group_name_alias: String).void }
|
|
81
|
+
attr_writer :market_group_name_alias
|
|
82
|
+
|
|
83
|
+
# Sport-specific market group names when they differ from the primary name
|
|
84
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
85
|
+
attr_reader :market_group_name_by_sport
|
|
86
|
+
|
|
87
|
+
sig { params(market_group_name_by_sport: T::Hash[Symbol, String]).void }
|
|
88
|
+
attr_writer :market_group_name_by_sport
|
|
89
|
+
|
|
90
|
+
# The unique identifier for this market
|
|
91
|
+
sig { returns(T.nilable(String)) }
|
|
92
|
+
attr_reader :odd_id
|
|
93
|
+
|
|
94
|
+
sig { params(odd_id: String).void }
|
|
95
|
+
attr_writer :odd_id
|
|
96
|
+
|
|
97
|
+
# The period of the event this market applies to
|
|
98
|
+
sig { returns(T.nilable(String)) }
|
|
99
|
+
attr_reader :period_id
|
|
100
|
+
|
|
101
|
+
sig { params(period_id: String).void }
|
|
102
|
+
attr_writer :period_id
|
|
103
|
+
|
|
104
|
+
# Set to a player's unique playerID if it's a player prop
|
|
105
|
+
sig { returns(T.nilable(String)) }
|
|
106
|
+
attr_reader :player_id
|
|
107
|
+
|
|
108
|
+
sig { params(player_id: String).void }
|
|
109
|
+
attr_writer :player_id
|
|
110
|
+
|
|
111
|
+
# The type of prop bet
|
|
112
|
+
sig { returns(T.nilable(SportsOddsAPI::Market::PropType::TaggedSymbol)) }
|
|
113
|
+
attr_reader :prop_type
|
|
114
|
+
|
|
115
|
+
sig { params(prop_type: SportsOddsAPI::Market::PropType::OrSymbol).void }
|
|
116
|
+
attr_writer :prop_type
|
|
117
|
+
|
|
118
|
+
# The side of the bet
|
|
119
|
+
sig { returns(T.nilable(String)) }
|
|
120
|
+
attr_reader :side_id
|
|
121
|
+
|
|
122
|
+
sig { params(side_id: String).void }
|
|
123
|
+
attr_writer :side_id
|
|
124
|
+
|
|
125
|
+
# The statEntityID represents whose performance on the stat is being evaluated
|
|
126
|
+
sig { returns(T.nilable(String)) }
|
|
127
|
+
attr_reader :stat_entity_id
|
|
128
|
+
|
|
129
|
+
sig { params(stat_entity_id: String).void }
|
|
130
|
+
attr_writer :stat_entity_id
|
|
131
|
+
|
|
132
|
+
# The statistic which is being evaluated as a part of this market
|
|
133
|
+
sig { returns(T.nilable(String)) }
|
|
134
|
+
attr_reader :stat_id
|
|
135
|
+
|
|
136
|
+
sig { params(stat_id: String).void }
|
|
137
|
+
attr_writer :stat_id
|
|
138
|
+
|
|
139
|
+
# Nested object showing which leagues and bookmakers support this market.
|
|
140
|
+
sig do
|
|
141
|
+
returns(
|
|
142
|
+
T.nilable(
|
|
143
|
+
T::Hash[Symbol, T::Hash[Symbol, SportsOddsAPI::Market::Support]]
|
|
144
|
+
)
|
|
145
|
+
)
|
|
146
|
+
end
|
|
147
|
+
attr_reader :support
|
|
148
|
+
|
|
149
|
+
sig do
|
|
150
|
+
params(
|
|
151
|
+
support:
|
|
152
|
+
T::Hash[
|
|
153
|
+
Symbol,
|
|
154
|
+
T::Hash[Symbol, SportsOddsAPI::Market::Support::OrHash]
|
|
155
|
+
]
|
|
156
|
+
).void
|
|
157
|
+
end
|
|
158
|
+
attr_writer :support
|
|
159
|
+
|
|
160
|
+
# Set to team's unique teamID if it's a team prop for a tournament type event
|
|
161
|
+
sig { returns(T.nilable(String)) }
|
|
162
|
+
attr_reader :team_id
|
|
163
|
+
|
|
164
|
+
sig { params(team_id: String).void }
|
|
165
|
+
attr_writer :team_id
|
|
166
|
+
|
|
167
|
+
sig do
|
|
168
|
+
params(
|
|
169
|
+
active_events: Float,
|
|
170
|
+
bet_type_id: String,
|
|
171
|
+
is_main_derivative: T::Boolean,
|
|
172
|
+
is_main_market: T::Boolean,
|
|
173
|
+
is_prop: T::Boolean,
|
|
174
|
+
is_sub_period: T::Boolean,
|
|
175
|
+
is_supported: T::Boolean,
|
|
176
|
+
market_group_id: String,
|
|
177
|
+
market_group_name: String,
|
|
178
|
+
market_group_name_alias: String,
|
|
179
|
+
market_group_name_by_sport: T::Hash[Symbol, String],
|
|
180
|
+
odd_id: String,
|
|
181
|
+
period_id: String,
|
|
182
|
+
player_id: String,
|
|
183
|
+
prop_type: SportsOddsAPI::Market::PropType::OrSymbol,
|
|
184
|
+
side_id: String,
|
|
185
|
+
stat_entity_id: String,
|
|
186
|
+
stat_id: String,
|
|
187
|
+
support:
|
|
188
|
+
T::Hash[
|
|
189
|
+
Symbol,
|
|
190
|
+
T::Hash[Symbol, SportsOddsAPI::Market::Support::OrHash]
|
|
191
|
+
],
|
|
192
|
+
team_id: String
|
|
193
|
+
).returns(T.attached_class)
|
|
194
|
+
end
|
|
195
|
+
def self.new(
|
|
196
|
+
# The number of unique active events with available odds for this market across
|
|
197
|
+
# all supported league and bookmaker combinations.
|
|
198
|
+
active_events: nil,
|
|
199
|
+
# The type of bet
|
|
200
|
+
bet_type_id: nil,
|
|
201
|
+
# True if this is a sub-period of a main market
|
|
202
|
+
is_main_derivative: nil,
|
|
203
|
+
# True if this is a main market
|
|
204
|
+
is_main_market: nil,
|
|
205
|
+
# True if this is a prop bet
|
|
206
|
+
is_prop: nil,
|
|
207
|
+
# True if this market is for a sub-period
|
|
208
|
+
is_sub_period: nil,
|
|
209
|
+
# True if this market is supported by at least one league/bookmaker.
|
|
210
|
+
is_supported: nil,
|
|
211
|
+
# The unique identifier for the group (all sides of the market) this market
|
|
212
|
+
# belongs to
|
|
213
|
+
market_group_id: nil,
|
|
214
|
+
# The primary display name for this market's group
|
|
215
|
+
market_group_name: nil,
|
|
216
|
+
# An alternative display name for this market's group
|
|
217
|
+
market_group_name_alias: nil,
|
|
218
|
+
# Sport-specific market group names when they differ from the primary name
|
|
219
|
+
market_group_name_by_sport: nil,
|
|
220
|
+
# The unique identifier for this market
|
|
221
|
+
odd_id: nil,
|
|
222
|
+
# The period of the event this market applies to
|
|
223
|
+
period_id: nil,
|
|
224
|
+
# Set to a player's unique playerID if it's a player prop
|
|
225
|
+
player_id: nil,
|
|
226
|
+
# The type of prop bet
|
|
227
|
+
prop_type: nil,
|
|
228
|
+
# The side of the bet
|
|
229
|
+
side_id: nil,
|
|
230
|
+
# The statEntityID represents whose performance on the stat is being evaluated
|
|
231
|
+
stat_entity_id: nil,
|
|
232
|
+
# The statistic which is being evaluated as a part of this market
|
|
233
|
+
stat_id: nil,
|
|
234
|
+
# Nested object showing which leagues and bookmakers support this market.
|
|
235
|
+
support: nil,
|
|
236
|
+
# Set to team's unique teamID if it's a team prop for a tournament type event
|
|
237
|
+
team_id: nil
|
|
238
|
+
)
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
sig do
|
|
242
|
+
override.returns(
|
|
243
|
+
{
|
|
244
|
+
active_events: Float,
|
|
245
|
+
bet_type_id: String,
|
|
246
|
+
is_main_derivative: T::Boolean,
|
|
247
|
+
is_main_market: T::Boolean,
|
|
248
|
+
is_prop: T::Boolean,
|
|
249
|
+
is_sub_period: T::Boolean,
|
|
250
|
+
is_supported: T::Boolean,
|
|
251
|
+
market_group_id: String,
|
|
252
|
+
market_group_name: String,
|
|
253
|
+
market_group_name_alias: String,
|
|
254
|
+
market_group_name_by_sport: T::Hash[Symbol, String],
|
|
255
|
+
odd_id: String,
|
|
256
|
+
period_id: String,
|
|
257
|
+
player_id: String,
|
|
258
|
+
prop_type: SportsOddsAPI::Market::PropType::TaggedSymbol,
|
|
259
|
+
side_id: String,
|
|
260
|
+
stat_entity_id: String,
|
|
261
|
+
stat_id: String,
|
|
262
|
+
support:
|
|
263
|
+
T::Hash[Symbol, T::Hash[Symbol, SportsOddsAPI::Market::Support]],
|
|
264
|
+
team_id: String
|
|
265
|
+
}
|
|
266
|
+
)
|
|
267
|
+
end
|
|
268
|
+
def to_hash
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# The type of prop bet
|
|
272
|
+
module PropType
|
|
273
|
+
extend SportsOddsAPI::Internal::Type::Enum
|
|
274
|
+
|
|
275
|
+
TaggedSymbol =
|
|
276
|
+
T.type_alias { T.all(Symbol, SportsOddsAPI::Market::PropType) }
|
|
277
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
278
|
+
|
|
279
|
+
GAME_PROP =
|
|
280
|
+
T.let(:game_prop, SportsOddsAPI::Market::PropType::TaggedSymbol)
|
|
281
|
+
TEAM_PROP =
|
|
282
|
+
T.let(:team_prop, SportsOddsAPI::Market::PropType::TaggedSymbol)
|
|
283
|
+
PLAYER_PROP =
|
|
284
|
+
T.let(:player_prop, SportsOddsAPI::Market::PropType::TaggedSymbol)
|
|
285
|
+
OTHER_PROP =
|
|
286
|
+
T.let(:other_prop, SportsOddsAPI::Market::PropType::TaggedSymbol)
|
|
287
|
+
|
|
288
|
+
sig do
|
|
289
|
+
override.returns(
|
|
290
|
+
T::Array[SportsOddsAPI::Market::PropType::TaggedSymbol]
|
|
291
|
+
)
|
|
292
|
+
end
|
|
293
|
+
def self.values
|
|
294
|
+
end
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
class Support < SportsOddsAPI::Internal::Type::BaseModel
|
|
298
|
+
OrHash =
|
|
299
|
+
T.type_alias do
|
|
300
|
+
T.any(
|
|
301
|
+
SportsOddsAPI::Market::Support,
|
|
302
|
+
SportsOddsAPI::Internal::AnyHash
|
|
303
|
+
)
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
# Whether this market is supported for the given league and bookmaker combination.
|
|
307
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
308
|
+
attr_reader :supported
|
|
309
|
+
|
|
310
|
+
sig { params(supported: T::Boolean).void }
|
|
311
|
+
attr_writer :supported
|
|
312
|
+
|
|
313
|
+
sig { params(supported: T::Boolean).returns(T.attached_class) }
|
|
314
|
+
def self.new(
|
|
315
|
+
# Whether this market is supported for the given league and bookmaker combination.
|
|
316
|
+
supported: nil
|
|
317
|
+
)
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
sig { override.returns({ supported: T::Boolean }) }
|
|
321
|
+
def to_hash
|
|
322
|
+
end
|
|
323
|
+
end
|
|
324
|
+
end
|
|
325
|
+
end
|
|
326
|
+
end
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module SportsOddsAPI
|
|
4
|
+
module Models
|
|
5
|
+
class MarketGetParams < SportsOddsAPI::Internal::Type::BaseModel
|
|
6
|
+
extend SportsOddsAPI::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include SportsOddsAPI::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
SportsOddsAPI::MarketGetParams,
|
|
13
|
+
SportsOddsAPI::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# A single betTypeID or comma-separated list of betTypeIDs to filter Markets by
|
|
18
|
+
sig { returns(T.nilable(String)) }
|
|
19
|
+
attr_reader :bet_type_id
|
|
20
|
+
|
|
21
|
+
sig { params(bet_type_id: String).void }
|
|
22
|
+
attr_writer :bet_type_id
|
|
23
|
+
|
|
24
|
+
# A single bookmakerID or comma-separated list of bookmakerIDs to filter Markets
|
|
25
|
+
# by
|
|
26
|
+
sig { returns(T.nilable(String)) }
|
|
27
|
+
attr_reader :bookmaker_id
|
|
28
|
+
|
|
29
|
+
sig { params(bookmaker_id: String).void }
|
|
30
|
+
attr_writer :bookmaker_id
|
|
31
|
+
|
|
32
|
+
# The cursor for pagination. Use nextCursor from prior response.
|
|
33
|
+
sig { returns(T.nilable(String)) }
|
|
34
|
+
attr_reader :cursor
|
|
35
|
+
|
|
36
|
+
sig { params(cursor: String).void }
|
|
37
|
+
attr_writer :cursor
|
|
38
|
+
|
|
39
|
+
# Filter to only include main markets (main period moneyline, spread, and
|
|
40
|
+
# over/under)
|
|
41
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
42
|
+
attr_reader :is_main_market
|
|
43
|
+
|
|
44
|
+
sig { params(is_main_market: T::Boolean).void }
|
|
45
|
+
attr_writer :is_main_market
|
|
46
|
+
|
|
47
|
+
# Filter by whether it is any type of prop bet market
|
|
48
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
49
|
+
attr_reader :is_prop
|
|
50
|
+
|
|
51
|
+
sig { params(is_prop: T::Boolean).void }
|
|
52
|
+
attr_writer :is_prop
|
|
53
|
+
|
|
54
|
+
# Filter by whether it tracks a sub/non-main period
|
|
55
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
56
|
+
attr_reader :is_sub_period
|
|
57
|
+
|
|
58
|
+
sig { params(is_sub_period: T::Boolean).void }
|
|
59
|
+
attr_writer :is_sub_period
|
|
60
|
+
|
|
61
|
+
# Filter whether this market is fully supported by at least 1 bookmaker in at
|
|
62
|
+
# least 1 league. Defaults to true if not specified.
|
|
63
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
64
|
+
attr_reader :is_supported
|
|
65
|
+
|
|
66
|
+
sig { params(is_supported: T::Boolean).void }
|
|
67
|
+
attr_writer :is_supported
|
|
68
|
+
|
|
69
|
+
# A single leagueID or comma-separated list of leagueIDs to filter Markets by
|
|
70
|
+
sig { returns(T.nilable(String)) }
|
|
71
|
+
attr_reader :league_id
|
|
72
|
+
|
|
73
|
+
sig { params(league_id: String).void }
|
|
74
|
+
attr_writer :league_id
|
|
75
|
+
|
|
76
|
+
# The maximum number of Markets to return (default: 100, max: 10000)
|
|
77
|
+
sig { returns(T.nilable(Float)) }
|
|
78
|
+
attr_reader :limit
|
|
79
|
+
|
|
80
|
+
sig { params(limit: Float).void }
|
|
81
|
+
attr_writer :limit
|
|
82
|
+
|
|
83
|
+
# A single oddID or comma-separated list of oddIDs. Used to specify specific
|
|
84
|
+
# Markets to return.
|
|
85
|
+
sig { returns(T.nilable(String)) }
|
|
86
|
+
attr_reader :odd_id
|
|
87
|
+
|
|
88
|
+
sig { params(odd_id: String).void }
|
|
89
|
+
attr_writer :odd_id
|
|
90
|
+
|
|
91
|
+
# A single periodID or comma-separated list of periodIDs to filter Markets by
|
|
92
|
+
sig { returns(T.nilable(String)) }
|
|
93
|
+
attr_reader :period_id
|
|
94
|
+
|
|
95
|
+
sig { params(period_id: String).void }
|
|
96
|
+
attr_writer :period_id
|
|
97
|
+
|
|
98
|
+
# Filter by prop type (game_prop, team_prop, player_prop, other_prop)
|
|
99
|
+
sig { returns(T.nilable(String)) }
|
|
100
|
+
attr_reader :prop_type
|
|
101
|
+
|
|
102
|
+
sig { params(prop_type: String).void }
|
|
103
|
+
attr_writer :prop_type
|
|
104
|
+
|
|
105
|
+
# A single sideID or comma-separated list of sideIDs to filter Markets by
|
|
106
|
+
sig { returns(T.nilable(String)) }
|
|
107
|
+
attr_reader :side_id
|
|
108
|
+
|
|
109
|
+
sig { params(side_id: String).void }
|
|
110
|
+
attr_writer :side_id
|
|
111
|
+
|
|
112
|
+
# A single sportID or comma-separated list of sportIDs to filter Markets by
|
|
113
|
+
sig { returns(T.nilable(String)) }
|
|
114
|
+
attr_reader :sport_id
|
|
115
|
+
|
|
116
|
+
sig { params(sport_id: String).void }
|
|
117
|
+
attr_writer :sport_id
|
|
118
|
+
|
|
119
|
+
# A single statEntityID or comma-separated list of statEntityIDs to filter Markets
|
|
120
|
+
# by
|
|
121
|
+
sig { returns(T.nilable(String)) }
|
|
122
|
+
attr_reader :stat_entity_id
|
|
123
|
+
|
|
124
|
+
sig { params(stat_entity_id: String).void }
|
|
125
|
+
attr_writer :stat_entity_id
|
|
126
|
+
|
|
127
|
+
# A single statID or comma-separated list of statIDs to filter Markets by
|
|
128
|
+
sig { returns(T.nilable(String)) }
|
|
129
|
+
attr_reader :stat_id
|
|
130
|
+
|
|
131
|
+
sig { params(stat_id: String).void }
|
|
132
|
+
attr_writer :stat_id
|
|
133
|
+
|
|
134
|
+
sig do
|
|
135
|
+
params(
|
|
136
|
+
bet_type_id: String,
|
|
137
|
+
bookmaker_id: String,
|
|
138
|
+
cursor: String,
|
|
139
|
+
is_main_market: T::Boolean,
|
|
140
|
+
is_prop: T::Boolean,
|
|
141
|
+
is_sub_period: T::Boolean,
|
|
142
|
+
is_supported: T::Boolean,
|
|
143
|
+
league_id: String,
|
|
144
|
+
limit: Float,
|
|
145
|
+
odd_id: String,
|
|
146
|
+
period_id: String,
|
|
147
|
+
prop_type: String,
|
|
148
|
+
side_id: String,
|
|
149
|
+
sport_id: String,
|
|
150
|
+
stat_entity_id: String,
|
|
151
|
+
stat_id: String,
|
|
152
|
+
request_options: SportsOddsAPI::RequestOptions::OrHash
|
|
153
|
+
).returns(T.attached_class)
|
|
154
|
+
end
|
|
155
|
+
def self.new(
|
|
156
|
+
# A single betTypeID or comma-separated list of betTypeIDs to filter Markets by
|
|
157
|
+
bet_type_id: nil,
|
|
158
|
+
# A single bookmakerID or comma-separated list of bookmakerIDs to filter Markets
|
|
159
|
+
# by
|
|
160
|
+
bookmaker_id: nil,
|
|
161
|
+
# The cursor for pagination. Use nextCursor from prior response.
|
|
162
|
+
cursor: nil,
|
|
163
|
+
# Filter to only include main markets (main period moneyline, spread, and
|
|
164
|
+
# over/under)
|
|
165
|
+
is_main_market: nil,
|
|
166
|
+
# Filter by whether it is any type of prop bet market
|
|
167
|
+
is_prop: nil,
|
|
168
|
+
# Filter by whether it tracks a sub/non-main period
|
|
169
|
+
is_sub_period: nil,
|
|
170
|
+
# Filter whether this market is fully supported by at least 1 bookmaker in at
|
|
171
|
+
# least 1 league. Defaults to true if not specified.
|
|
172
|
+
is_supported: nil,
|
|
173
|
+
# A single leagueID or comma-separated list of leagueIDs to filter Markets by
|
|
174
|
+
league_id: nil,
|
|
175
|
+
# The maximum number of Markets to return (default: 100, max: 10000)
|
|
176
|
+
limit: nil,
|
|
177
|
+
# A single oddID or comma-separated list of oddIDs. Used to specify specific
|
|
178
|
+
# Markets to return.
|
|
179
|
+
odd_id: nil,
|
|
180
|
+
# A single periodID or comma-separated list of periodIDs to filter Markets by
|
|
181
|
+
period_id: nil,
|
|
182
|
+
# Filter by prop type (game_prop, team_prop, player_prop, other_prop)
|
|
183
|
+
prop_type: nil,
|
|
184
|
+
# A single sideID or comma-separated list of sideIDs to filter Markets by
|
|
185
|
+
side_id: nil,
|
|
186
|
+
# A single sportID or comma-separated list of sportIDs to filter Markets by
|
|
187
|
+
sport_id: nil,
|
|
188
|
+
# A single statEntityID or comma-separated list of statEntityIDs to filter Markets
|
|
189
|
+
# by
|
|
190
|
+
stat_entity_id: nil,
|
|
191
|
+
# A single statID or comma-separated list of statIDs to filter Markets by
|
|
192
|
+
stat_id: nil,
|
|
193
|
+
request_options: {}
|
|
194
|
+
)
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
sig do
|
|
198
|
+
override.returns(
|
|
199
|
+
{
|
|
200
|
+
bet_type_id: String,
|
|
201
|
+
bookmaker_id: String,
|
|
202
|
+
cursor: String,
|
|
203
|
+
is_main_market: T::Boolean,
|
|
204
|
+
is_prop: T::Boolean,
|
|
205
|
+
is_sub_period: T::Boolean,
|
|
206
|
+
is_supported: T::Boolean,
|
|
207
|
+
league_id: String,
|
|
208
|
+
limit: Float,
|
|
209
|
+
odd_id: String,
|
|
210
|
+
period_id: String,
|
|
211
|
+
prop_type: String,
|
|
212
|
+
side_id: String,
|
|
213
|
+
sport_id: String,
|
|
214
|
+
stat_entity_id: String,
|
|
215
|
+
stat_id: String,
|
|
216
|
+
request_options: SportsOddsAPI::RequestOptions
|
|
217
|
+
}
|
|
218
|
+
)
|
|
219
|
+
end
|
|
220
|
+
def to_hash
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
end
|
|
@@ -14,8 +14,8 @@ module SportsOddsAPI
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
# The cursor for the request. Used to get the next group of Players. This
|
|
18
|
-
#
|
|
17
|
+
# The cursor for the request. Used to get the next group of Players. This is an
|
|
18
|
+
# opaque token — pass the nextCursor value from the prior response unchanged.
|
|
19
19
|
sig { returns(T.nilable(String)) }
|
|
20
20
|
attr_reader :cursor
|
|
21
21
|
|
|
@@ -61,8 +61,8 @@ module SportsOddsAPI
|
|
|
61
61
|
).returns(T.attached_class)
|
|
62
62
|
end
|
|
63
63
|
def self.new(
|
|
64
|
-
# The cursor for the request. Used to get the next group of Players. This
|
|
65
|
-
#
|
|
64
|
+
# The cursor for the request. Used to get the next group of Players. This is an
|
|
65
|
+
# opaque token — pass the nextCursor value from the prior response unchanged.
|
|
66
66
|
cursor: nil,
|
|
67
67
|
# EventID to get Players data for
|
|
68
68
|
event_id: nil,
|