Class: Files::Preview

Inherits:
Object
  • Object
show all
Defined in:
lib/files.com/models/preview.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}, options = {}) ⇒ Preview

Returns a new instance of Preview.



7
8
9
10
# File 'lib/files.com/models/preview.rb', line 7

def initialize(attributes = {}, options = {})
  @attributes = attributes || {}
  @options = options || {}
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



5
6
7
# File 'lib/files.com/models/preview.rb', line 5

def attributes
  @attributes
end

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/files.com/models/preview.rb', line 5

def options
  @options
end

Instance Method Details

#download_uriObject

string - Link to download preview



23
24
25
# File 'lib/files.com/models/preview.rb', line 23

def download_uri
  @attributes[:download_uri]
end

#idObject

int64 - Preview ID



13
14
15
# File 'lib/files.com/models/preview.rb', line 13

def id
  @attributes[:id]
end

#sizeObject

string - Preview size



33
34
35
# File 'lib/files.com/models/preview.rb', line 33

def size
  @attributes[:size]
end

#statusObject

string - Preview status. Can be invalid, not_generated, generating, complete, or file_too_large



18
19
20
# File 'lib/files.com/models/preview.rb', line 18

def status
  @attributes[:status]
end

#typeObject

string - Preview type. Can be image, pdf, pdf_native, video, or audio



28
29
30
# File 'lib/files.com/models/preview.rb', line 28

def type
  @attributes[:type]
end