class Giddy::Download
Public Class Methods
new(mediator)
click to toggle source
Calls superclass method
# File lib/giddy/download.rb, line 3 def initialize(mediator) super mediator, "download", true end
Public Instance Methods
create_download_request(tokens)
click to toggle source
# File lib/giddy/download.rb, line 19 def create_download_request(tokens) tokens = [tokens].flatten.map { |token| { :DownloadToken => token } } result = gettyup :CreateDownloadRequest, { :DownloadItems => tokens }, "CreateDownload" result["DownloadUrls"].inject({}) { |h,i| h[i["ImageId"]] = Utils.rubified_hash(i); h } end