Class: CoderWally::Client
- Inherits:
-
Object
- Object
- CoderWally::Client
- Defined in:
- lib/coder_wally/client.rb
Overview
Client to access the API
Instance Method Summary collapse
-
#get_badges_for(*username) ⇒ Object
Get badges for given user and return has collection of ‘Badge`s.
-
#get_details_for(*username) ⇒ Object
Get user details for given user and return a ‘User` object.
-
#get_everything_for(*username) ⇒ Object
Get all the information available for a given user, returns a ‘CoderWall` object.
-
#initialize(username) ⇒ Client
constructor
Instantiate class.
-
#user ⇒ Object
Get all the information for a given user Returns a user object.
Constructor Details
Instance Method Details
#get_badges_for(*username) ⇒ Object
Get badges for given user and return has collection of ‘Badge`s
12 13 14 15 |
# File 'lib/coder_wally/client.rb', line 12 def get_badges_for(*username) ("get_badges_for(#{username})",'user.badges') @coder_wall.user.badges end |
#get_details_for(*username) ⇒ Object
Get user details for given user and return a ‘User` object
18 19 20 21 |
# File 'lib/coder_wally/client.rb', line 18 def get_details_for(*username) ("get_details_for(#{username})",'user.details') @coder_wall.user.details end |
#get_everything_for(*username) ⇒ Object
Get all the information available for a given user, returns a ‘CoderWall` object
25 26 27 28 |
# File 'lib/coder_wally/client.rb', line 25 def get_everything_for(*username) ("get_everything_for(#{username})",'user') @coder_wall end |
#user ⇒ Object
Get all the information for a given user Returns a user object
32 33 34 |
# File 'lib/coder_wally/client.rb', line 32 def user @coder_wall.user end |