Class: OctocatHerder
- Inherits:
-
Object
- Object
- OctocatHerder
- Defined in:
- lib/octocat_herder.rb,
lib/octocat_herder/base.rb,
lib/octocat_herder/user.rb,
lib/octocat_herder/connection.rb,
lib/octocat_herder/repository.rb,
lib/octocat_herder/pull_request.rb,
lib/octocat_herder/pull_request/repo.rb
Overview
This is just a convenience class to serve as a jumping-off point into the rest of the GitHub API. You don’t have to use this, if you don’t want; you can use the other classes directly, constructing your own OctocatHerder::Connection to pass to them.
This provides convenience methods for the following:
-
OctocatHerder::User
Defined Under Namespace
Modules: Base Classes: Connection, PullRequest, Repository, User
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
The instance of OctocatHerder::Connection used for making API requests.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ OctocatHerder
constructor
Get a new OctocatHerder for use with the GitHub v3 API.
-
#user(user_name) ⇒ Object
Fetch an OctocatHerder::User by using OctocatHerder::User.fetch and the OctocatHerder::Connection from #connection.
Constructor Details
#initialize(options = {}) ⇒ OctocatHerder
Get a new OctocatHerder for use with the GitHub v3 API.
23 24 25 |
# File 'lib/octocat_herder.rb', line 23 def initialize(={}) @connection = OctocatHerder::Connection.new() end |
Instance Attribute Details
#connection ⇒ Object (readonly)
The instance of OctocatHerder::Connection used for making API requests.
16 17 18 |
# File 'lib/octocat_herder.rb', line 16 def connection @connection end |
Instance Method Details
#user(user_name) ⇒ Object
Fetch an OctocatHerder::User by using OctocatHerder::User.fetch and the OctocatHerder::Connection from #connection
32 33 34 |
# File 'lib/octocat_herder.rb', line 32 def user(user_name) OctocatHerder::User.fetch(user_name, connection) end |