Class: SocialNet::Instagram::Models::Video

Inherits:
Object
  • Object
show all
Defined in:
lib/social_net/instagram/models/video.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Video

Returns a new instance of Video.



7
8
9
10
11
12
13
14
# File 'lib/social_net/instagram/models/video.rb', line 7

def initialize(attrs = {})
  @id = attrs['id']
  @caption = attrs['caption']['text']
  @likes = attrs['likes']['count']
  @file = attrs['videos']['standard_resolution']['url']
  @thumbnail = attrs['images']['standard_resolution']['url']
  @link = attrs['link']
end

Instance Attribute Details

#captionObject (readonly)

Returns the value of attribute caption.



5
6
7
# File 'lib/social_net/instagram/models/video.rb', line 5

def caption
  @caption
end

#fileObject (readonly)

Returns the value of attribute file.



5
6
7
# File 'lib/social_net/instagram/models/video.rb', line 5

def file
  @file
end

#idObject (readonly)

Returns the value of attribute id.



5
6
7
# File 'lib/social_net/instagram/models/video.rb', line 5

def id
  @id
end

#likesObject (readonly)

Returns the value of attribute likes.



5
6
7
# File 'lib/social_net/instagram/models/video.rb', line 5

def likes
  @likes
end

Returns the value of attribute link.



5
6
7
# File 'lib/social_net/instagram/models/video.rb', line 5

def link
  @link
end

#thumbnailObject (readonly)

Returns the value of attribute thumbnail.



5
6
7
# File 'lib/social_net/instagram/models/video.rb', line 5

def thumbnail
  @thumbnail
end