Class: FilmOn::Movie

Inherits:
Object
  • Object
show all
Defined in:
lib/film_on/models/movie.rb

Overview

FilmOn::Movie Movie can have either a basic set of data or a more verbose set depending on whether it is called as part of a vod_search or as in individual call from #movie, takes a raw hash and converts it into a nice ruby object

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Movie

Returns a new instance of Movie.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/film_on/models/movie.rb', line 16

def initialize(hash)
  @id = hash["id"]
  @title = hash["title"]
  @slug = hash["slug"]
  @description = hash["description"]
  @type_id = hash["type_id"]
  @series_number = hash["series_number"]
  @episodes_count = hash["episodes_count"]
  @vendor_id = hash["vendor_id"]
  @vendorka_id = hash["vendorka_id"]
  @content_host = hash["content_host"]
  @low_quality_file_id = hash["low_quality_file_id"]
  @high_quality_file_id = hash["high_quality_file_id"]
  @parent_id = hash["parent_id"]
  @exists_on_edgecast = hash["exists_on_edgecast"]
  @is_featured = hash["is_featured"]
  @is_enabled = hash["is_enabled"]
  @deleted_at = hash["deleted_at"]
  @genres = hash["genres"]
  @cast = hash["cast"]
  @crew = hash["crew"]
  @artwork = hash["artwork"] #TODO convert to image structs
  @poster = hash["poster"] #TODO convert to image structs
  @georule = hash["georule"]
  @type = hash["type"]
  @streams = hash["streams"]
  @content_blocked = hash["content_blocked"]
end

Instance Attribute Details

#artworkObject (readonly)

Returns the value of attribute artwork.



13
14
15
# File 'lib/film_on/models/movie.rb', line 13

def artwork
  @artwork
end

#castObject (readonly)

Returns the value of attribute cast.



13
14
15
# File 'lib/film_on/models/movie.rb', line 13

def cast
  @cast
end

#content_blockedObject (readonly)

Returns the value of attribute content_blocked.



14
15
16
# File 'lib/film_on/models/movie.rb', line 14

def content_blocked
  @content_blocked
end

#content_hostObject (readonly)

Returns the value of attribute content_host.



12
13
14
# File 'lib/film_on/models/movie.rb', line 12

def content_host
  @content_host
end

#crewObject (readonly)

Returns the value of attribute crew.



13
14
15
# File 'lib/film_on/models/movie.rb', line 13

def crew
  @crew
end

#deleted_atObject (readonly)

Returns the value of attribute deleted_at.



13
14
15
# File 'lib/film_on/models/movie.rb', line 13

def deleted_at
  @deleted_at
end

#descriptionObject (readonly)

Returns the value of attribute description.



11
12
13
# File 'lib/film_on/models/movie.rb', line 11

def description
  @description
end

#episodes_countObject (readonly)

Returns the value of attribute episodes_count.



11
12
13
# File 'lib/film_on/models/movie.rb', line 11

def episodes_count
  @episodes_count
end

#exists_on_edgecastObject (readonly)

Returns the value of attribute exists_on_edgecast.



12
13
14
# File 'lib/film_on/models/movie.rb', line 12

def exists_on_edgecast
  @exists_on_edgecast
end

#genresObject (readonly)

Returns the value of attribute genres.



13
14
15
# File 'lib/film_on/models/movie.rb', line 13

def genres
  @genres
end

#georuleObject (readonly)

Returns the value of attribute georule.



13
14
15
# File 'lib/film_on/models/movie.rb', line 13

def georule
  @georule
end

#high_quality_file_idObject (readonly)

Returns the value of attribute high_quality_file_id.



12
13
14
# File 'lib/film_on/models/movie.rb', line 12

def high_quality_file_id
  @high_quality_file_id
end

#idObject (readonly)

Returns the value of attribute id.



11
12
13
# File 'lib/film_on/models/movie.rb', line 11

def id
  @id
end

#is_enabledObject (readonly)

Returns the value of attribute is_enabled.



13
14
15
# File 'lib/film_on/models/movie.rb', line 13

def is_enabled
  @is_enabled
end

Returns the value of attribute is_featured.



13
14
15
# File 'lib/film_on/models/movie.rb', line 13

def is_featured
  @is_featured
end

#low_quality_file_idObject (readonly)

Returns the value of attribute low_quality_file_id.



12
13
14
# File 'lib/film_on/models/movie.rb', line 12

def low_quality_file_id
  @low_quality_file_id
end

#parent_idObject (readonly)

Returns the value of attribute parent_id.



12
13
14
# File 'lib/film_on/models/movie.rb', line 12

def parent_id
  @parent_id
end

#posterObject (readonly)

Returns the value of attribute poster.



13
14
15
# File 'lib/film_on/models/movie.rb', line 13

def poster
  @poster
end

#series_numberObject (readonly)

Returns the value of attribute series_number.



11
12
13
# File 'lib/film_on/models/movie.rb', line 11

def series_number
  @series_number
end

#slugObject (readonly)

Returns the value of attribute slug.



11
12
13
# File 'lib/film_on/models/movie.rb', line 11

def slug
  @slug
end

#streamsObject (readonly)

Returns the value of attribute streams.



14
15
16
# File 'lib/film_on/models/movie.rb', line 14

def streams
  @streams
end

#titleObject (readonly)

Returns the value of attribute title.



11
12
13
# File 'lib/film_on/models/movie.rb', line 11

def title
  @title
end

#typeObject (readonly)

Returns the value of attribute type.



13
14
15
# File 'lib/film_on/models/movie.rb', line 13

def type
  @type
end

#type_idObject (readonly)

Returns the value of attribute type_id.



11
12
13
# File 'lib/film_on/models/movie.rb', line 11

def type_id
  @type_id
end

#vendor_idObject (readonly)

Returns the value of attribute vendor_id.



11
12
13
# File 'lib/film_on/models/movie.rb', line 11

def vendor_id
  @vendor_id
end

#vendorka_idObject (readonly)

Returns the value of attribute vendorka_id.



11
12
13
# File 'lib/film_on/models/movie.rb', line 11

def vendorka_id
  @vendorka_id
end