Class: SocialSnippet::Registry::RegistryResources::Repositories

Inherits:
Base
  • Object
show all
Defined in:
lib/social_snippet/registry/registry_resources/repositories.rb

Instance Attribute Summary

Attributes inherited from Base

#api_version, #cookies, #default_headers, #end_point, #host, #protocol, #rest_client, #social_snippet

Instance Method Summary collapse

Methods inherited from Base

#get, #initialize, #post

Constructor Details

This class inherits a constructor from SocialSnippet::Registry::RegistryResources::Base

Instance Method Details

#add_url(repo_url) ⇒ Object


17
18
19
# File 'lib/social_snippet/registry/registry_resources/repositories.rb', line 17

def add_url(repo_url)
  post "repositories", :url => repo_url
end

#allObject


5
6
7
# File 'lib/social_snippet/registry/registry_resources/repositories.rb', line 5

def all
  get "repositories"
end

#find(repo_name) ⇒ Object


13
14
15
# File 'lib/social_snippet/registry/registry_resources/repositories.rb', line 13

def find(repo_name)
  get "repositories/#{repo_name}"
end

#search(query) ⇒ Object


9
10
11
# File 'lib/social_snippet/registry/registry_resources/repositories.rb', line 9

def search(query)
  get "repositories?q=#{query}"
end