Class: AuthKeys::Team
- Inherits:
-
Object
- Object
- AuthKeys::Team
- Defined in:
- lib/auth_keys/github/team.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.all ⇒ Object
7 8 9 10 11 |
# File 'lib/auth_keys/github/team.rb', line 7 def self.all Request.get("https://api.github.com/orgs/#{AuthKeys.config.org_name}/teams").map do |attr| self.new(attr) end end |
Instance Method Details
#details ⇒ Object
13 14 15 |
# File 'lib/auth_keys/github/team.rb', line 13 def details Request.get "https://api.github.com/teams/#{id}" end |
#keys ⇒ Object
25 26 27 28 29 30 |
# File 'lib/auth_keys/github/team.rb', line 25 def keys members.map do |m| puts "Key found for #{m.login}" if AuthKeys.config.verbose m.keys.map { |k| "#{k["key"]} #{m.login}" } end.flatten end |
#members ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/auth_keys/github/team.rb', line 17 def members @members ||= begin Request.get("https://api.github.com/teams/#{id}/members").map do |attr| Member.new(attr) end end end |