Codeforces API Client Library
The wrapper library for Codeforces API written in Ruby.
0. Installation
Add this line to your application's Gemfile:
gem "codeforces"
And then execute:
$ bundle
Or install it yourself as:
$ gem install codeforces
1. Usage
Helper Method
require "codeforces"
Codeforces.each_contest do |contest|
puts contest.name
end
require "codeforces"
tourist = Codeforces.user("tourist")
puts tourist.
# -> 3254
puts tourist.rank
# -> international grandmaster
See also: rubydocs
API Access
require "codeforces"
Codeforces.api.contest.list.each do |contest|
puts contest.name
end
See also: http://codeforces.com/api/help/methods
2. Contributing
- 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