Class: GovRepos
- Inherits:
-
Object
- Object
- GovRepos
- Defined in:
- lib/gov-repos.rb
Instance Method Summary collapse
Instance Method Details
#get_repos ⇒ Object
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 |account| username = account["service_url"].split("http://github.com/")[1] account_repositories = HTTParty.get "https://api.github.com/users/#{username}/repos" account_repositories.map do |repository| repository end end end |