Module: GitHub::Finders
- Included in:
- GitHub
- Defined in:
- lib/github/finders.rb
Instance Method Summary collapse
- #branches(login, repository_name) ⇒ Object
- #followers(login) ⇒ Object
- #following(login) ⇒ Object
- #network(login, repository_name) ⇒ Object
- #repositories(login) ⇒ Object
- #repository(login, repository_name) ⇒ Object
- #user(login) ⇒ Object
- #watched(login) ⇒ Object
Instance Method Details
#branches(login, repository_name) ⇒ Object
33 34 35 |
# File 'lib/github/finders.rb', line 33 def branches(login, repository_name) json("/repos/show/#{login}/#{repository_name}/branches", :branches) end |
#followers(login) ⇒ Object
13 14 15 16 |
# File 'lib/github/finders.rb', line 13 def followers(login) j = json("/user/show/#{login}/followers", :users) User.users_from_json(j) end |
#following(login) ⇒ Object
8 9 10 11 |
# File 'lib/github/finders.rb', line 8 def following(login) j = json("/user/show/#{login}/following", :users) User.users_from_json(j) end |
#network(login, repository_name) ⇒ Object
37 38 39 40 |
# File 'lib/github/finders.rb', line 37 def network(login, repository_name) j = json("/repos/show/#{login}/#{repository_name}/network", :network) Repository.repositories_from_json(j) end |
#repositories(login) ⇒ Object
18 19 20 21 |
# File 'lib/github/finders.rb', line 18 def repositories(login) j = json("/repos/show/#{login}", :repositories) Repository.repositories_from_json(j) end |
#repository(login, repository_name) ⇒ Object
28 29 30 31 |
# File 'lib/github/finders.rb', line 28 def repository(login, repository_name) j = json("/repos/show/#{login}/#{repository_name}", :repository) Repository.from_json(j) end |
#user(login) ⇒ Object
3 4 5 6 |
# File 'lib/github/finders.rb', line 3 def user(login) j = json("/user/show/#{login}", :user) User.from_json(j) end |
#watched(login) ⇒ Object
23 24 25 26 |
# File 'lib/github/finders.rb', line 23 def watched(login) j = json("/repos/watched/#{login}", :repositories) Repository.repositories_from_json(j) end |