Class: GovRepos

Inherits:
Object
  • Object
show all
Defined in:
lib/gov-repos.rb

Instance Method Summary collapse

Instance Method Details

#get_reposObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/gov-repos.rb', line 4

def get_repos
  
  gov_accounts = HTTParty.get "http://registry.usa.gov/accounts.json?service_id=github&agency_id=&tag="

  result = gov_accounts["accounts"].map do ||
    username = ["service_url"].split("http://github.com/")[1]
     = HTTParty.get "https://api.github.com/users/#{username}/repos"
    
    .map do |repository|
      repository
    end

  end
end