The wrapper library for Codeforces API written in Ruby.
Add this line to your application's Gemfile:
gem "codeforces"
And then execute:
$ bundle
Or install it yourself as:
$ gem install codeforces
require "codeforces"
Codeforces.each_contest do |contest|
puts contest.name
end
require "codeforces"
tourist = Codeforces.user("tourist")
puts tourist.rating
# -> 3254
puts tourist.rank
# -> international grandmaster
See also: rubydocs
require "codeforces"
Codeforces.api.contest.list.each do |contest|
puts contest.name
end
See also: http://codeforces.com/api/help/methods
- Fork it ( https://github.com/sh19910711/codeforces-api.rb/fork )
- 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 a new Pull Request