cschaeffler/binarybeast — pull request #1 by masterlink720 (2012-12-30 04:57:56+00:00)
Title: Updates

you don't have to pull these changes, I've admittedly never worked in ruby before and may have gone a little overboard on the changes... but at least all of the rspec tests for tournaments work

Maybe you can use some of it at least - let me know

Here's a quick rundown:

- All sub classes extend the base class "Service"
- All API requests go through BinaryBeast.call, to keep the code DRY
- BinaryBeast.call now allows you to provide a callback / code block
- Renamed class names from Binarybeast to BinaryBeast, to be more consistent with the other libraries binarybeast uses
- Renames Tourney class to Tournament, again for consistency with other API libraries
- Added constants.rb, which provides a few values for developer convenience, like replay upload/download modes, tournament type integers, etc etc
- Added a few attr_accessors to Tournament
- Created a constant in Tournament called DEFAULTS, as opposed to having to each value it in the initializer
- The base Service class defines a few methods you can use to automatically iterate through values to assign and retrieve, so you don't have to define a long list of attribute assignments when you get a response from the API