Class: XboxVideo::Video

Inherits:
Object
  • Object
show all
Defined in:
lib/xbox_video/video.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Video

Returns a new instance of Video.



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/xbox_video/video.rb', line 10

def initialize(options={})
  @clip_id = options['gameClipId']
  @published = (options['state'] == 'Published')
  @publish_date = options['datePublished']
  @record_date = options['dateRecorded']
  @modified_date = options['lastModified']
  @caption = options['userCaption']
  @type = options['userCaption']
  @duration = options['durationInSeconds']
  @rating = options['rating']
  @rating_count = options['ratingCount']
  @views = options['views']
  @title = options['clipName']
  @game = options['titleName']
  @device = options['deviceType']
  @likes_count = options['likeCount']
  @shares_count = options['shareCount']
  @comments_count = options['commentCount']
  @thumbnails = generate_thumbnails options['thumbnails']
  @clips = generate_clips options['gameClipUris']
end

Instance Attribute Details

#captionObject

Returns the value of attribute caption.



6
7
8
# File 'lib/xbox_video/video.rb', line 6

def caption
  @caption
end

#clip_idObject

Returns the value of attribute clip_id.



6
7
8
# File 'lib/xbox_video/video.rb', line 6

def clip_id
  @clip_id
end

#clipsObject

Returns the value of attribute clips.



6
7
8
# File 'lib/xbox_video/video.rb', line 6

def clips
  @clips
end

#comments_countObject

Returns the value of attribute comments_count.



6
7
8
# File 'lib/xbox_video/video.rb', line 6

def comments_count
  @comments_count
end

#deviceObject

Returns the value of attribute device.



6
7
8
# File 'lib/xbox_video/video.rb', line 6

def device
  @device
end

#durationObject

Returns the value of attribute duration.



6
7
8
# File 'lib/xbox_video/video.rb', line 6

def duration
  @duration
end

#gameObject

Returns the value of attribute game.



6
7
8
# File 'lib/xbox_video/video.rb', line 6

def game
  @game
end

#likes_countObject

Returns the value of attribute likes_count.



6
7
8
# File 'lib/xbox_video/video.rb', line 6

def likes_count
  @likes_count
end

#modified_dateObject

Returns the value of attribute modified_date.



6
7
8
# File 'lib/xbox_video/video.rb', line 6

def modified_date
  @modified_date
end

#publish_dateObject

Returns the value of attribute publish_date.



6
7
8
# File 'lib/xbox_video/video.rb', line 6

def publish_date
  @publish_date
end

#publishedObject

Returns the value of attribute published.



6
7
8
# File 'lib/xbox_video/video.rb', line 6

def published
  @published
end

#ratingObject

Returns the value of attribute rating.



6
7
8
# File 'lib/xbox_video/video.rb', line 6

def rating
  @rating
end

#rating_countObject

Returns the value of attribute rating_count.



6
7
8
# File 'lib/xbox_video/video.rb', line 6

def rating_count
  @rating_count
end

#record_dateObject

Returns the value of attribute record_date.



6
7
8
# File 'lib/xbox_video/video.rb', line 6

def record_date
  @record_date
end

#shares_countObject

Returns the value of attribute shares_count.



6
7
8
# File 'lib/xbox_video/video.rb', line 6

def shares_count
  @shares_count
end

#thumbnailsObject

Returns the value of attribute thumbnails.



6
7
8
# File 'lib/xbox_video/video.rb', line 6

def thumbnails
  @thumbnails
end

#titleObject

Returns the value of attribute title.



6
7
8
# File 'lib/xbox_video/video.rb', line 6

def title
  @title
end

#typeObject

Returns the value of attribute type.



6
7
8
# File 'lib/xbox_video/video.rb', line 6

def type
  @type
end

#viewsObject

Returns the value of attribute views.



6
7
8
# File 'lib/xbox_video/video.rb', line 6

def views
  @views
end