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