Class: Iremix::Video
- Inherits:
-
Object
- Object
- Iremix::Video
- Defined in:
- lib/iremix/video.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#description ⇒ Object
Returns the value of attribute description.
-
#group_id ⇒ Object
Returns the value of attribute group_id.
-
#id ⇒ Object
Returns the value of attribute id.
-
#person_id ⇒ Object
Returns the value of attribute person_id.
-
#screenshot_url ⇒ Object
Returns the value of attribute screenshot_url.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#title ⇒ Object
Returns the value of attribute title.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#video_url ⇒ Object
Returns the value of attribute video_url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Video
constructor
A new instance of Video.
Constructor Details
#initialize(attrs = {}) ⇒ Video
Returns a new instance of Video.
6 7 8 |
# File 'lib/iremix/video.rb', line 6 def initialize(attrs = {}) attrs.each do |k, v| send("#{k}=", v) end end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/iremix/video.rb', line 3 def created_at @created_at end |
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/iremix/video.rb', line 3 def description @description end |
#group_id ⇒ Object
Returns the value of attribute group_id.
3 4 5 |
# File 'lib/iremix/video.rb', line 3 def group_id @group_id end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/iremix/video.rb', line 3 def id @id end |
#person_id ⇒ Object
Returns the value of attribute person_id.
3 4 5 |
# File 'lib/iremix/video.rb', line 3 def person_id @person_id end |
#screenshot_url ⇒ Object
Returns the value of attribute screenshot_url.
3 4 5 |
# File 'lib/iremix/video.rb', line 3 def screenshot_url @screenshot_url end |
#tags ⇒ Object
Returns the value of attribute tags.
3 4 5 |
# File 'lib/iremix/video.rb', line 3 def @tags end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/iremix/video.rb', line 3 def title @title end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
3 4 5 |
# File 'lib/iremix/video.rb', line 3 def updated_at @updated_at end |
#video_url ⇒ Object
Returns the value of attribute video_url.
3 4 5 |
# File 'lib/iremix/video.rb', line 3 def video_url @video_url end |
Class Method Details
.all(token) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/iremix/video.rb', line 11 def all(token) response = token.get('/api/v1/videos.json', :params => { :access_token => token.token }) videos = [] response.parsed['videos'].each do |video_attrs| videos << new(video_attrs) end videos end |