Referee.
Referee is an easy way to communicate with the Dribbble API.
Installation
(sudo) gem install httparty referee
Usage
Use Referee as a class. For example.
player = Referee::Player.info(42)
puts player['name'] #=> Jeffrey Zeldman
It’s that easy.
Method List
Anything in curly brackets ({}) are optional.
Shots
Referee::Shot.info(id) #=> Returns the information about the given shot.
Referee::Shot.list(id{, :page => #, :per_page => #}) #=> Returns one of the special lists (everyone, debut, popular). Supports pagination.
Referee::Shot.rebounds(id) #=> Returns a list of rebounds for the given shot.
Referee::Shot.comments(id) #=> Returns a list of comments for the given shot.
Players
Referee::Player.shots(id{, :page => #, :per_page => #}) #=> Returns the latest shots from the given player. Supports pagination.
Referee::Player.shots_from_following(id{, :page => #, :per_page => #}) # => Returns the latest shots from the players the given player is following. Supports pagination.
Referee::Player.info(id) #=> Returns information about the given player.
Referee::Player.followers(id) #=> Returns a list of players that are following the given player.
Referee::Player.following(id) #=> Returns a list of players that the given player are following.
Referee::Player.drafted(id) #=> Returns a list of players that the given player drafted.
Attributes
To get any attributes from a method, just use standard JSON object parsing.
zeldman = Referee::Player.info(42)
zeldman['name'] #=> Jeffrey Zeldman