Skip to content

michaelparenteau/swish

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swish! A Ruby wrapper for the Dribbble API

Learn about the Dribbble API at dribbble.com/api.

Installation

Swish is just a Ruby gem:

gem install swish

Not playing in the Ruby league? Here are the others we know of so far:

Examples

require 'swish'

# Find a shot
shot = Dribbble::Shot.find(21603)

# See some data about the shot
shot.title
shot.image_url
shot.url
shot.player.name
shot.views_count
shot.likes_count
shot.comments_count
shot.rebounds_count

# Find more shots
inspiring       = Dribbble::Shot.popular
call_the_police = Dribbble::Shot.everyone
yay_noobs       = Dribbble::Shot.debuts

# Paginate through shots (default is 15 per page, max 30)
Dribbble::Shot.popular(:page => 2, :per_page => 3)
Dribbble::Shot.everyone(:page => 10, :per_page => 5)
Dribbble::Shot.debuts(:page => 5, :per_page => 30)

# Find a player
player = Dribbble::Player.find('jeremy')

# See some data about the player
player.name
player.avatar_url
player.url
player.location
player.twitter_screen_name
player.drafted_by_player_id

# Player stats
player.shots_count
player.draftees_count
player.followers_count
player.following_count

# List a player's shots
player.shots
player.shots(:page => 2, :per_page => 10)

# List shots by player's that this player follows
player.shots_following
player.shots_following(:page => 5, :per_page => 30)

# List a player's draftees
player.draftees

# List a player's followers
player.followers

# List the players who a player is following
player.following

Note on Patches/Pull Requests

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2010 Jeremy Weiskotten. See LICENSE for details.

About

Ruby wrapper for the Dribbble API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%