Sha256: 558f6f2cca50a7415d131cdbf683e4b1853cd021c6a4257ad363c870bd4af5a2

Contents?: true

Size: 514 Bytes

Versions: 2

Compression:

Stored size: 514 Bytes

Contents

require_relative 'HttpHelper'

class DownloadRequest

	attr_accessor :asset_id

	def initialize(api_key, access_token)

		self
		@api_key = api_key
		@access_token = access_token

		@http_helper = HttpHelper.new(api_key, access_token)		

	end	

	public 	
	def with_id(asset_id)	
		self.asset_id = asset_id
		return self
	end

	public
	def execute
		
		uri = '/v3/downloads/' + self.asset_id + '?auto_download=false'
		data = @http_helper.post(uri)			
	 	return data['uri']

	end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ConnectSDK-1.0.2.Beta lib/DownloadRequest.rb
ConnectSDK-1.0.1.Beta lib/DownloadRequest.rb