class AV
Class for AV
objects – allows to check status and upgrade to filelink once completed
Attributes
apikey[R]
security[R]
Public Class Methods
new(url, apikey: nil, security: nil)
click to toggle source
# File lib/filestack/models/filestack_av.rb, line 11 def initialize(url, apikey: nil, security: nil) @url = url @apikey = apikey @security = security end
Public Instance Methods
status()
click to toggle source
Checks the status of the video conversion
@return [String]
# File lib/filestack/models/filestack_av.rb, line 31 def status response = UploadUtils.make_call(@url, 'get') response_body = JSON.parse(response.body) response_body['status'] end
to_filelink()
click to toggle source
Turns AV
into filelink if video conversion is complete
@return [Filestack::FilestackFilelink]
# File lib/filestack/models/filestack_av.rb, line 20 def to_filelink return 'Video conversion incomplete' unless status == 'completed' response = UploadUtils.make_call(@url, 'get') response_body = JSON.parse(response.body) handle = response_body['data']['url'].split('/').last FilestackFilelink.new(handle, apikey: @apikey, security: @security) end