Class: Swivel::Visual
Instance Attribute Summary
Attributes inherited from Response
#disable_auto_refresh, #hash_doc, #refreshed_at
Class Method Summary collapse
Instance Method Summary collapse
-
#image_url(options = {}) ⇒ Object
Forms the url for an image.
Methods inherited from Response
#[], #id, #initialize, #method_missing, #to_param, #to_s, #to_xml
Constructor Details
This class inherits a constructor from Swivel::Response
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Swivel::Response
Class Method Details
.resource ⇒ Object
468 469 470 |
# File 'lib/swivel.rb', line 468 def self.resource 'visual' end |
Instance Method Details
#image_url(options = {}) ⇒ Object
Forms the url for an image.
473 474 475 476 477 478 479 |
# File 'lib/swivel.rb', line 473 def image_url ={} = {:format => "png", :s => Time.now.to_i, :secret => secret}.merge() host, port = @connection.config[:host], @connection.config[:port] port = port == 80 ? '' : ":#{port}" url = "http://#{host}#{port}/visuals/#{id}.#{.delete(:format)}?#{@connection.requestify()}" end |