Method: Asianodds::Login#place_bet
- Defined in:
- lib/asianodds/login.rb
#place_bet(attributes) ⇒ Object
Get information about the odds, minimum and maximum amounts to bet etc. for a certain match THIS IS A POST REQUEST
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/asianodds/login.rb', line 249 def place_bet(attributes) body = { "GameId": attributes[:game_id], "GameType": attributes[:game_type], "IsFullTime": attributes[:is_full_time], "Bookies": attributes[:bookies], "MarketTypeId": attributes[:market_type], "OddsFormat": attributes[:odds_format], "OddsName": attributes[:odds_name], "SportsType": attributes[:sports_type], "BookieOdds": attributes[:bookie_odds], "Amount": attributes[:amount] }.to_json if loggedin? # Always needs to be called before placing the bet get_placement_info(attributes) return post_request('PlaceBet', body) else #raise NotLoggedIn end end |