Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A ruby wrapper for github api
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
.rspec
.travis.yml
Gemfile
Gemfile.lock
LICENSE.txt
README.mkd
Rakefile

README.mkd

gitruby Build Status

Yet another github api wrapper in ruby

Tips

You should be familiar with the github api (developer.github.com)

Conventions

The booleans methods are automatically turned from "boolean_method" to "boolean_method?".

Usage

For now we just support User, Org, Issue and Repo. (more documentation comming soon)

User

bernardofire = User.find('bernardofire') # returns an object with user's api attritbutes and methods
=> #<User:0x00000002098d58

 @login="bernardofire",
 @name="Bernardo Barreto",
 .....>

bernardofire.id  # => 824254
bernardofire.type  # => "User"

bernardofire.followers  # returns a list of users objects
=> [#<User:0x0000000259ea28
  @login="gabriellima",
  @url="https://api.github.com/users/gabriellima">
  .....]

bernardofire.following  # returns a list of users objects
=> [#<User:0x0000000259ea28
  @login="gabriellima",
  @url="https://api.github.com/users/gabriellima">
  .....]

bernardofire.public_repos  # returns a list of repos objects
=> [#<Repo:0x00000001c46818
  @name="gitruby"
  ....>,
  #<Repo:0x0000000230d9a8
  @name="RepoStapler"
  ....>]

bernardofire.orgs  # returns a list of orgs objects which the user belongs
[#<Org:0x00000001fddf08
  @login="nsi-iff",
  ....>,
 #<Org:0x00000001fdbc08
  @login="cobrateam",
  ....>]

Contributing to gitruby

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright

Copyright (c) 2012 Bernardo B. Marques. See LICENSE.txt for further details.

Bitdeli Badge

Something went wrong with that request. Please try again.