Class: GHClient::Api
- Inherits:
-
Object
- Object
- GHClient::Api
- Defined in:
- lib/ghclient/api.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
Returns the value of attribute connection.
Instance Method Summary collapse
- #get_languages_for_repository(repository) ⇒ Object
- #get_repositories(user_name) ⇒ Object
- #get_user(user_name) ⇒ Object
-
#initialize(connection = GHClient::Connection.new()) ⇒ Api
constructor
A new instance of Api.
Constructor Details
#initialize(connection = GHClient::Connection.new()) ⇒ Api
Returns a new instance of Api.
11 12 13 |
# File 'lib/ghclient/api.rb', line 11 def initialize connection = GHClient::Connection.new() @connection = connection end |
Instance Attribute Details
#connection ⇒ Object
Returns the value of attribute connection.
9 10 11 |
# File 'lib/ghclient/api.rb', line 9 def connection @connection end |
Instance Method Details
#get_languages_for_repository(repository) ⇒ Object
23 24 25 |
# File 'lib/ghclient/api.rb', line 23 def get_languages_for_repository(repository) @connection.get GHClient::Repository.languages_path(repository) end |
#get_repositories(user_name) ⇒ Object
19 20 21 |
# File 'lib/ghclient/api.rb', line 19 def get_repositories user_name @connection.get GHClient::User.repositories_path(user_name) end |