Class: SportsOddsAPI::Models::EventGetParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/sports_odds_api/models/event_get_params.rb,
sig/sports_odds_api/models/event_get_params.rbs

Overview

See Also:

  • SportsOddsAPI::Resources::Events#get

Constant Summary

Constants included from Internal::Type::RequestParameters

Internal::Type::RequestParameters::SportsOddsAPI

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(bookmaker_id: nil, cancelled: nil, cursor: nil, ended: nil, event_id: nil, event_ids: nil, finalized: nil, include_alt_lines: nil, include_opposing_odds: nil, league_id: nil, limit: nil, live: nil, odd_id: nil, odds_available: nil, odds_present: nil, player_id: nil, sport_id: nil, started: nil, starts_after: nil, starts_before: nil, team_id: nil, type: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see SportsOddsAPI::Models::EventGetParams for more details.

Parameters:

  • bookmaker_id (String) (defaults to: nil)

    A bookmakerID or comma-separated list of bookmakerIDs to include odds for

  • cancelled (Boolean) (defaults to: nil)

    Only include cancelled Events (true), only non-cancelled Events (false) or all E

  • cursor (String) (defaults to: nil)

    The cursor for the request. Used to get the next group of Events. This should be

  • ended (Boolean) (defaults to: nil)

    Only include Events which have have ended (true), only Events which have not end

  • event_id (String) (defaults to: nil)

    An eventID to get Event data for

  • event_ids (String) (defaults to: nil)

    A comma separated list of eventIDs to get Event data for

  • finalized (Boolean) (defaults to: nil)

    Only include finalized Events (true), exclude unfinalized Events (false) or all

  • include_alt_lines (Boolean) (defaults to: nil)

    Whether to include alternate lines in the odds byBookmaker data

  • include_opposing_odds (Boolean) (defaults to: nil)

    Whether to include opposing odds for each included oddID

  • league_id (String) (defaults to: nil)

    A leagueID or comma-separated list of leagueIDs to get Events for

  • limit (Float) (defaults to: nil)

    The maximum number of Events to return

  • live (Boolean) (defaults to: nil)

    Only include live Events (true), only non-live Events (false) or all Events (omi

  • odd_id (String) (defaults to: nil)

    An oddID or comma-separated list of oddIDs to include odds for

  • odds_available (Boolean) (defaults to: nil)

    Whether you want only Events which do (true) or do not (false) have odds markets

  • odds_present (Boolean) (defaults to: nil)

    Whether you want only Events which do (true) or do not (false) have any associat

  • player_id (String) (defaults to: nil)

    A playerID or comma-separated list of playerIDs to include Events (and associate

  • sport_id (String) (defaults to: nil)

    A sportID or comma-separated list of sportIDs to get Events for

  • started (Boolean) (defaults to: nil)

    Only include Events which have have previously started (true), only Events which

  • starts_after (Time) (defaults to: nil)

    Get Events that start after this date

  • starts_before (Time) (defaults to: nil)

    Get Events that start before this date

  • team_id (String) (defaults to: nil)

    A teamID or comma-separated list of teamIDs to include Events for

  • type (String) (defaults to: nil)

    Only include Events of the specified type

  • request_options (SportsOddsAPI::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/sports_odds_api/models/event_get_params.rb', line 152

Instance Attribute Details

#bookmaker_idString?

A bookmakerID or comma-separated list of bookmakerIDs to include odds for

Parameters:

  • (String)

Returns:

  • (String, nil)


14
# File 'lib/sports_odds_api/models/event_get_params.rb', line 14

optional :bookmaker_id, String

#cancelledBoolean?

Only include cancelled Events (true), only non-cancelled Events (false) or all Events (omit)

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


21
# File 'lib/sports_odds_api/models/event_get_params.rb', line 21

optional :cancelled, SportsOddsAPI::Internal::Type::Boolean

#cursorString?

The cursor for the request. Used to get the next group of Events. This should be the nextCursor from the prior response.

Parameters:

  • (String)

Returns:

  • (String, nil)


28
# File 'lib/sports_odds_api/models/event_get_params.rb', line 28

optional :cursor, String

#endedBoolean?

Only include Events which have have ended (true), only Events which have not ended (false) or all Events (omit)

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


35
# File 'lib/sports_odds_api/models/event_get_params.rb', line 35

optional :ended, SportsOddsAPI::Internal::Type::Boolean

#event_idString?

An eventID to get Event data for

Parameters:

  • (String)

Returns:

  • (String, nil)


41
# File 'lib/sports_odds_api/models/event_get_params.rb', line 41

optional :event_id, String

#event_idsString?

A comma separated list of eventIDs to get Event data for

Parameters:

  • (String)

Returns:

  • (String, nil)


47
# File 'lib/sports_odds_api/models/event_get_params.rb', line 47

optional :event_ids, String

#finalizedBoolean?

Only include finalized Events (true), exclude unfinalized Events (false) or all Events (omit)

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


54
# File 'lib/sports_odds_api/models/event_get_params.rb', line 54

optional :finalized, SportsOddsAPI::Internal::Type::Boolean

#include_alt_linesBoolean?

Whether to include alternate lines in the odds byBookmaker data

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


60
# File 'lib/sports_odds_api/models/event_get_params.rb', line 60

optional :include_alt_lines, SportsOddsAPI::Internal::Type::Boolean

#include_opposing_oddsBoolean?

Whether to include opposing odds for each included oddID

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


66
# File 'lib/sports_odds_api/models/event_get_params.rb', line 66

optional :include_opposing_odds, SportsOddsAPI::Internal::Type::Boolean

#league_idString?

A leagueID or comma-separated list of leagueIDs to get Events for

Parameters:

  • (String)

Returns:

  • (String, nil)


72
# File 'lib/sports_odds_api/models/event_get_params.rb', line 72

optional :league_id, String

#limitFloat?

The maximum number of Events to return

Parameters:

  • (Float)

Returns:

  • (Float, nil)


78
# File 'lib/sports_odds_api/models/event_get_params.rb', line 78

optional :limit, Float

#liveBoolean?

Only include live Events (true), only non-live Events (false) or all Events (omit)

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


85
# File 'lib/sports_odds_api/models/event_get_params.rb', line 85

optional :live, SportsOddsAPI::Internal::Type::Boolean

#odd_idString?

An oddID or comma-separated list of oddIDs to include odds for

Parameters:

  • (String)

Returns:

  • (String, nil)


91
# File 'lib/sports_odds_api/models/event_get_params.rb', line 91

optional :odd_id, String

#odds_availableBoolean?

Whether you want only Events which do (true) or do not (false) have odds markets which are currently available (open for wagering)

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


98
# File 'lib/sports_odds_api/models/event_get_params.rb', line 98

optional :odds_available, SportsOddsAPI::Internal::Type::Boolean

#odds_presentBoolean?

Whether you want only Events which do (true) or do not (false) have any associated odds markets regardless of whether those odds markets are currently available (open for wagering)

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


106
# File 'lib/sports_odds_api/models/event_get_params.rb', line 106

optional :odds_present, SportsOddsAPI::Internal::Type::Boolean

#player_idString?

A playerID or comma-separated list of playerIDs to include Events (and associated odds) for

Parameters:

  • (String)

Returns:

  • (String, nil)


113
# File 'lib/sports_odds_api/models/event_get_params.rb', line 113

optional :player_id, String

#sport_idString?

A sportID or comma-separated list of sportIDs to get Events for

Parameters:

  • (String)

Returns:

  • (String, nil)


119
# File 'lib/sports_odds_api/models/event_get_params.rb', line 119

optional :sport_id, String

#startedBoolean?

Only include Events which have have previously started (true), only Events which have not previously started (false) or all Events (omit)

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


126
# File 'lib/sports_odds_api/models/event_get_params.rb', line 126

optional :started, SportsOddsAPI::Internal::Type::Boolean

#starts_afterTime?

Get Events that start after this date

Parameters:

  • (Time)

Returns:

  • (Time, nil)


132
# File 'lib/sports_odds_api/models/event_get_params.rb', line 132

optional :starts_after, Time

#starts_beforeTime?

Get Events that start before this date

Parameters:

  • (Time)

Returns:

  • (Time, nil)


138
# File 'lib/sports_odds_api/models/event_get_params.rb', line 138

optional :starts_before, Time

#team_idString?

A teamID or comma-separated list of teamIDs to include Events for

Parameters:

  • (String)

Returns:

  • (String, nil)


144
# File 'lib/sports_odds_api/models/event_get_params.rb', line 144

optional :team_id, String

#typeString?

Only include Events of the specified type

Parameters:

  • (String)

Returns:

  • (String, nil)


150
# File 'lib/sports_odds_api/models/event_get_params.rb', line 150

optional :type, String

Instance Method Details

#to_hash{

Returns:

  • ({)


148
# File 'sig/sports_odds_api/models/event_get_params.rbs', line 148

def to_hash: -> {