Aries
An unofficial Ruby library for AriesMS rankings. It scrapes the ranking page and present the data in a organised fashion.
Installation
Add this line to your application's Gemfile:
gem 'ariesms'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ariesms
Usage
require 'aries'
# Returns a single Character object.
character = Aries::Character.find('Ruby')
# Returns the number of online characters.
characters = Aries::Character.online
# Returns the overall ranking.
characters = Aries::Character.all
# Returns the job ranking.
characters = Aries::Character.job('phantom')
# Returns the most famed characters.
characters = Aries::Character.fame
You can pass a page number as an argument, e.g. Aries::Character.all(2)
. Each
page returns an array of 10 Character objects.
Aries::Character
It's self explanatory.
{
@id => 1,
@name => "Yakan",
@job => "Bow Master",
@world => "Scania"
@level => 219,
@paragon => 0,
@fame => 117
}
Unfortunately the ID present in the ranking table is relative, so it doesn't
reflect the ranking position when using Aries::Character.find
. It's not a lib
issue.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Fix offenses (
rubocop -a
) - Run the tests (
rake spec
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
License
The gem is available as open source under the terms of the MIT License.