Class: SocialNet::Instagram::Models::Video
- Inherits:
-
Object
- Object
- SocialNet::Instagram::Models::Video
- Defined in:
- lib/social_net/instagram/models/video.rb
Instance Attribute Summary collapse
-
#caption ⇒ Object
readonly
Returns the value of attribute caption.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#likes ⇒ Object
readonly
Returns the value of attribute likes.
-
#thumbnail ⇒ Object
readonly
Returns the value of attribute thumbnail.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Video
constructor
A new instance of Video.
Constructor Details
#initialize(attrs = {}) ⇒ Video
Returns a new instance of Video.
7 8 9 10 11 12 13 |
# 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'] end |
Instance Attribute Details
#caption ⇒ Object (readonly)
Returns the value of attribute caption.
5 6 7 |
# File 'lib/social_net/instagram/models/video.rb', line 5 def caption @caption end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
5 6 7 |
# File 'lib/social_net/instagram/models/video.rb', line 5 def file @file end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/social_net/instagram/models/video.rb', line 5 def id @id end |
#likes ⇒ Object (readonly)
Returns the value of attribute likes.
5 6 7 |
# File 'lib/social_net/instagram/models/video.rb', line 5 def likes @likes end |
#thumbnail ⇒ Object (readonly)
Returns the value of attribute thumbnail.
5 6 7 |
# File 'lib/social_net/instagram/models/video.rb', line 5 def thumbnail @thumbnail end |