Module: GitHub::Finders

Included in:
GitHub
Defined in:
lib/github/finders.rb

Instance Method Summary collapse

Instance Method Details

#branches(login, repository_name) ⇒ Object



33
34
35
# File 'lib/github/finders.rb', line 33

def branches(, repository_name)
  json("/repos/show/#{}/#{repository_name}/branches", :branches)
end

#followers(login) ⇒ Object



13
14
15
16
# File 'lib/github/finders.rb', line 13

def followers()
  j = json("/user/show/#{}/followers", :users)
  User.users_from_json(j)
end

#following(login) ⇒ Object



8
9
10
11
# File 'lib/github/finders.rb', line 8

def following()
  j = json("/user/show/#{}/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(, repository_name)
  j = json("/repos/show/#{}/#{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()
  j = json("/repos/show/#{}", :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(, repository_name)
  j = json("/repos/show/#{}/#{repository_name}", :repository)
  Repository.from_json(j)
end

#user(login) ⇒ Object



3
4
5
6
# File 'lib/github/finders.rb', line 3

def user()
  j = json("/user/show/#{}", :user)
  User.from_json(j)
end

#watched(login) ⇒ Object



23
24
25
26
# File 'lib/github/finders.rb', line 23

def watched()
  j = json("/repos/watched/#{}", :repositories)
  Repository.repositories_from_json(j)
end