Scorum
Betting API

Betting API. More...

Public API

std::vector< matched_bet_api_objectscorum::app::betting_api::get_game_returns (const uuid_type &game_uuid) const
 Returns bets with draw status. More...
 
std::vector< winner_api_objectscorum::app::betting_api::get_game_winners (const uuid_type &game_uuid) const
 Returns all winners for particular game. More...
 
std::vector< game_api_objectscorum::app::betting_api::get_games_by_status (const fc::flat_set< chain::game_status > &filter) const
 Returns games. More...
 
std::vector< game_api_objectscorum::app::betting_api::get_games_by_uuids (const std::vector< uuid_type > &uuids) const
 Returns games. More...
 
std::vector< game_api_objectscorum::app::betting_api::lookup_games_by_id (chain::game_id_type from, uint32_t limit) const
 Returns games. More...
 
std::vector< matched_bet_api_objectscorum::app::betting_api::lookup_matched_bets (chain::matched_bet_id_type from, uint32_t limit) const
 Returns matched bets. More...
 
std::vector< pending_bet_api_objectscorum::app::betting_api::lookup_pending_bets (chain::pending_bet_id_type from, uint32_t limit) const
 Return pending bets. More...
 
std::vector< matched_bet_api_objectscorum::app::betting_api::get_matched_bets (const std::vector< uuid_type > &uuids) const
 Returns matched bets. More...
 
std::vector< pending_bet_api_objectscorum::app::betting_api::get_pending_bets (const std::vector< uuid_type > &uuids) const
 Return pending bets. More...
 
std::vector< matched_bet_api_objectscorum::app::betting_api::get_game_matched_bets (const uuid_type &uuid) const
 Returns matched bets for game. More...
 
std::vector< pending_bet_api_objectscorum::app::betting_api::get_game_pending_bets (const uuid_type &uuid) const
 Return pending bets for game. More...
 
betting_property_api_object scorum::app::betting_api::get_betting_properties () const
 Return betting properties. More...
 

Detailed Description

Betting API.

This api does not require plugins

Function Documentation

◆ get_betting_properties()

betting_property_api_object scorum::app::betting_api::get_betting_properties ( ) const

Return betting properties.

Returns
betting propery api object

Definition at line 80 of file betting_api.cpp.

◆ get_game_matched_bets()

std::vector< matched_bet_api_object > scorum::app::betting_api::get_game_matched_bets ( const uuid_type uuid) const

Returns matched bets for game.

Parameters
uuidGame uuid
Returns
array of matched_bet_api_object's

Definition at line 70 of file betting_api.cpp.

◆ get_game_pending_bets()

std::vector< pending_bet_api_object > scorum::app::betting_api::get_game_pending_bets ( const uuid_type uuid) const

Return pending bets for game.

Parameters
uuidGame uuid
Returns
array of pending_bet_api_object's

Definition at line 75 of file betting_api.cpp.

◆ get_game_returns()

std::vector< matched_bet_api_object > scorum::app::betting_api::get_game_returns ( const uuid_type game_uuid) const

Returns bets with draw status.

Parameters
game_uuidGame UUID
Returns
array of matched_bet_object's

Definition at line 25 of file betting_api.cpp.

◆ get_game_winners()

std::vector< winner_api_object > scorum::app::betting_api::get_game_winners ( const uuid_type game_uuid) const

Returns all winners for particular game.

Parameters
game_uuidGame UUID
Returns
array of winner_api_object's

Definition at line 30 of file betting_api.cpp.

◆ get_games_by_status()

std::vector< game_api_object > scorum::app::betting_api::get_games_by_status ( const fc::flat_set< chain::game_status > &  filter) const

Returns games.

Parameters
filter[created, started, finished, resolved, expired, cancelled]
Returns
array of game_api_object's

Definition at line 35 of file betting_api.cpp.

◆ get_games_by_uuids()

std::vector< game_api_object > scorum::app::betting_api::get_games_by_uuids ( const std::vector< uuid_type > &  uuids) const

Returns games.

Parameters
UUIDsof games to return
Returns
array of game_api_object's

Definition at line 40 of file betting_api.cpp.

◆ get_matched_bets()

std::vector< matched_bet_api_object > scorum::app::betting_api::get_matched_bets ( const std::vector< uuid_type > &  uuids) const

Returns matched bets.

Parameters
uuidsThe vector of UUIDs of pending bets which form matched bets
Returns
array of matched_bet_api_object's

Definition at line 60 of file betting_api.cpp.

◆ get_pending_bets()

std::vector< pending_bet_api_object > scorum::app::betting_api::get_pending_bets ( const std::vector< uuid_type > &  uuids) const

Return pending bets.

Parameters
uuidsThe vector of UUIDs of pending bets which should be returned
Returns
array of pending_bet_api_object's

Definition at line 65 of file betting_api.cpp.

◆ lookup_games_by_id()

std::vector< game_api_object > scorum::app::betting_api::lookup_games_by_id ( chain::game_id_type  from,
uint32_t  limit 
) const

Returns games.

Parameters
fromlower bound game id
limitquery limit
Returns
array of game_api_object's

Definition at line 45 of file betting_api.cpp.

◆ lookup_matched_bets()

std::vector< matched_bet_api_object > scorum::app::betting_api::lookup_matched_bets ( chain::matched_bet_id_type  from,
uint32_t  limit 
) const

Returns matched bets.

Parameters
fromlower bound bet id
limitquery limit
Returns
array of matched_bet_api_object's

Definition at line 50 of file betting_api.cpp.

◆ lookup_pending_bets()

std::vector< pending_bet_api_object > scorum::app::betting_api::lookup_pending_bets ( chain::pending_bet_id_type  from,
uint32_t  limit 
) const

Return pending bets.

Parameters
fromlower bound bet id
limitquery limit
Returns
array of pending_bet_api_object's

Definition at line 55 of file betting_api.cpp.