Skip to content

sh19910711/codeforces-api.rb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codeforces API Client Library

The wrapper library for Codeforces API written in Ruby.

Gem Version API Doc Travis CI Build Status Code Climate Test Coverage AppVeyor Build Status Circle CI

Demo

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.rating
# -> 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

  1. Fork it ( https://github.com/sh19910711/codeforces-api.rb/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request