Sha256: f4add262f8aa438b498511d52b6acb5b7c7a8073db80db0b5c8bc6660444d17b

Contents?: true

Size: 1.48 KB

Versions: 1

Compression:

Stored size: 1.48 KB

Contents

= octopi

Octopi is a Ruby interface to GitHub API v2 (http://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

  # connect "user", "<<token>>" do |github|
  #   puts github.user.name
  # end

== Author

Felipe Coury - http://felipecoury.com
HasMany.info blog - http://hasmany.info

== Copyright

DISCLAIMER: The name of this library is pronounced _octo-pie_ but no Octocats were harmed during its creation. It's not really an Octo Pie, but a contraction of the words Octocat and API.

Copyright (c) 2009 Felipe Coury. See LICENSE for details.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fcoury-octopi-0.0.1 README.rdoc