Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby JavaScript

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib
test
LICENSE
README.rdoc
Rakefile
VERSION.yml
octopi.gemspec

README.rdoc

octopi

Octopi is a Ruby interface to GitHub API v2 (developer.github.com). It's under early but active development and already works.

Example

require 'octopi' include Octopi

# user information user = User.find(“fcoury”) puts “#{user.name} is being followed by #{user.followers.join(”, “)} and following #{user.following.join(”, “)}”

# the bang version of followers and following # fetches user object for each user, but is # a lot more expensive user.followers!.each do |u|

puts "  - #{u.name} (#{u.login}) has #{u.public_repo_count} repo(s)"

end

# search user users = User.find_all(“silva”) puts “#{users.size} users found for 'silva':” users.each do |u|

puts "  - #{u.name}"

end

# repository information repo = Repository.find(“fcoury”, “octopi”) puts “Repository: #{repo.name} - #{repo.description} (by #{repo.owner}) - #{repo.url}”

# repository search repos = Repository.find_all(“ruby+git”) puts “#{repos.size} repository(ies) with 'ruby' and 'git':” repos.each do |r|

puts "  - #{r.name}"

end

Copyright

DISCLAIMER: Even tho the pronounce is octo-pie, no Octocats were harmed during the production of this lib. It's not an Octo Pie, but a contraction of the words Octocat and API.

Copyright © 2009 Felipe Coury. See LICENSE for details.

Something went wrong with that request. Please try again.