Module: SupermarketApi::Client::Cookbooks
- Included in:
- SupermarketApi::Client
- Defined in:
- lib/supermarketapi/client/cookbook.rb
Overview
Methods for the Cookbook API.
Instance Method Summary collapse
-
#cookbook(cookbook_name) ⇒ Hashie::Mash
Show all information about a cookbook.
-
#cookbook_version(cookbook_name, cookbook_version) ⇒ Hashie::Mash
Show informatiom about a cookbook version.
-
#cookbooks(user = nil, start = 0, items = 50, order = :most_followed) ⇒ Hashie::Mash
Show information about all cookbook.
Instance Method Details
#cookbook(cookbook_name) ⇒ Hashie::Mash
Show all information about a cookbook
This method returns all available information for the given cookbook
17 18 19 |
# File 'lib/supermarketapi/client/cookbook.rb', line 17 def cookbook(cookbook_name) get "/cookbooks/#{cookbook_name}" end |
#cookbook_version(cookbook_name, cookbook_version) ⇒ Hashie::Mash
Show informatiom about a cookbook version
This method returns all available information for the given cookbook version
29 30 31 |
# File 'lib/supermarketapi/client/cookbook.rb', line 29 def cookbook_version(cookbook_name, cookbook_version) get "/cookbooks/#{cookbook_name}/versions/#{cookbook_version}" end |
#cookbooks(user = nil, start = 0, items = 50, order = :most_followed) ⇒ Hashie::Mash
Show information about all cookbook
This method returns high level information for a number of cookbooks
41 42 43 44 45 46 47 48 49 |
# File 'lib/supermarketapi/client/cookbook.rb', line 41 def cookbooks(user=nil, start=0, items=50, order=:most_followed) = { :start => start, :items => items, :order => order, } [:user] = user if user get "/cookbooks", end |