API-NG is Betfair's next generation API for developers looking to create automated betting systems or custom interfaces for themselves or for Betfair customers. Using this gem you may do calls to API-NG for fetching some interesting information about competitions, events and markets.
Add this line to your application's Gemfile:
gem 'betfair_api_ng_rails', '2.0.0'
And then execute:
$ bundle
Or install it yourself as:
$ gem install betfair_api_ng_rails
Or if you want to stay on the edge:
gem 'betfair_api_ng_rails', github: 'alterego-labs/betfair_api_ng_rails'
After this run next rake command:
$ bundle exec rake betfair_api_ng_rails:install
After installation will appear two files:
config/betfair_api_ng_rails.yml
config/initializers/betfair_api_ng_rails.rb
In this files you must specify credentials to API-NG. Also you should notice that this gem used non-interactive login and you must generate ssh keys for logining well. More information about this you may find there.
Please check wiki pages.
One of the main features of this release was the multiaccounting. Since version 1.5.0 is now available opportunity to place bets using placeOrders method. But at the same time there was another problem - to place bets in various Betfair accounts, and that the current implementation does not allow. Starting with version 2.0.0 is such an opportunity exists. But just be careful: if you want to use version 2.0.0 in an existing project, you have to do a small step:
BetfairApiNgRails.config do |config|
# Rest of configuration same as for 1.5.0
# Setting up account
BetfairApiNgRails.account_manager.store BetfairApiNgRails::Account.new(config.username,
config.password,
config.application_key,
config.ssl_crt_filepath,
config.ssl_key_filepath)
BetfairApiNgRails.account_manager.default config.username
end
For additional info please visit specific wiki page.
- Add supporting placeOrders method
- Supporting all Simple listing filtered requests
- Supporting listMarketCatalogue and listMarketBook methods
- Raising APINGException if error occurred similar official API-NG
- Refactoring and testing
- Replaced ActiveRecord style querying by more similar structure to API-NG
- Starting to testing
- Refactoring
- Fixing more of bugs
- Came back formatters and out-of-box exists formatter for JsTree
- Added all enums
- Added shortcuts for models
- Refactoring
You may running all specs by rspec spec --color
to be sure that all is alright.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request