Class: Squall::Template
Overview
OnApp Template
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#list ⇒ Object
Public: Lists available templates.
-
#make_public(id) ⇒ Object
Public: Make a Template public so that it can be downloaded via a HTTP URL.
Methods inherited from Base
#check_config, #default_params, #key_for_class, #request
Instance Method Details
#list ⇒ Object
Public: Lists available templates.
Returns an Array.
7 8 9 10 |
# File 'lib/squall/template.rb', line 7 def list response = request(:get, '/templates.json') response.collect { |temp| temp['image_template'] } end |
#make_public(id) ⇒ Object
Public: Make a Template public so that it can be downloaded via a HTTP URL.
id - ID of template
Returns a Hash.
18 19 20 21 |
# File 'lib/squall/template.rb', line 18 def make_public(id) response = request(:post, "/templates/#{id}/make_public.json") response.first[1] end |