Challonge API for user

This gem is for educational use only. I have created this to have a practice on how to create an API wrapper for Rails and create it in a ruby gem.

Installation

Add this line to your application's Gemfile:

gem 'challonge_user_rails'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install challonge_user_rails

Usage

Get an API Token from Challonge site

Create an account on Challonge Website and get an API via Settings - Developer API.

Configure

It is suggested to create an instance of the client.

client = ChallongeUserRails::Client.new(api_key: [YOUR API KEY])

Get all Tournaments

client.tournaments

Get specific Tournament

Tournament URL is the URL parameter (not the address) of the tournament when you create it.

client.tournament(tournament_url)

Delete Tournament

client.delete_tournament(tournament_url)

Create Tournament

Challonge API expects a json data with attributes related to creation of a tournament. You may refer to their docs for an example json value.

client.create_tournament(data)

Get All Matches

client.matches

Get Tournament Matches

client.match(tournament_url, match_id)

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/michael-dollosa/challonge_user_rails. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the ChallongeUserRails project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.