Skip to content
This repository

A simple Coderwall users interface in Ruby

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 coderwall-ruby-api.gemspec
README.md

Coderwall Ruby API

A simple Ruby API for access Coderwall user's data.

Usage

First, install the gem :

gem install coderwall-ruby-api

Then, play :

require 'coderwall'

user = Coderwall::User.new('fidelisrafael') # Load user data
user.username # => 'fidelisrafael'
user.name     # => 'Rafael Fidelis'

When you create a Coderwall::User instance, automatically the data is fetched from Coderwall, so if you want to fetch user' data only when it requisited, do this:

user = Corderwall::User.new('fidelisrafael',false) # create the object , but don't fetch the user data

user.location  # => fetch the url and return user location
user.name      # => use the cached user data requisited above

Differents ways to acess data :

user = Coderwall::User.new('fidelisrafael') # Load user data

user_badges = user.badges       # Method
user_badges = user[:badges]     # Hash notation
# Other examples
user_github_account = user.accounts['github']
user_github_account = user['accounts']['github']

# via class methods
user_badges = Coderwall::User.badges('fidelisrafael')
user_location = Coderwall::User.location('fidelisrafael')
# Another examples
user_badges = Coderwall::User.achievements('fidelisrafael')
user_github_account = Coderwall::User.accounts('fidelisrafael')['github']

Contributors

License

The project is licensed under the MIT license. See LICENSE file for details.

Contribute

Please feel free to either fork me or post issues.

Something went wrong with that request. Please try again.