Class: Iremix::Video

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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_atObject

Returns the value of attribute created_at.



3
4
5
# File 'lib/iremix/video.rb', line 3

def created_at
  @created_at
end

#descriptionObject

Returns the value of attribute description.



3
4
5
# File 'lib/iremix/video.rb', line 3

def description
  @description
end

#group_idObject

Returns the value of attribute group_id.



3
4
5
# File 'lib/iremix/video.rb', line 3

def group_id
  @group_id
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/iremix/video.rb', line 3

def id
  @id
end

#person_idObject

Returns the value of attribute person_id.



3
4
5
# File 'lib/iremix/video.rb', line 3

def person_id
  @person_id
end

#screenshot_urlObject

Returns the value of attribute screenshot_url.



3
4
5
# File 'lib/iremix/video.rb', line 3

def screenshot_url
  @screenshot_url
end

#tagsObject

Returns the value of attribute tags.



3
4
5
# File 'lib/iremix/video.rb', line 3

def tags
  @tags
end

#titleObject

Returns the value of attribute title.



3
4
5
# File 'lib/iremix/video.rb', line 3

def title
  @title
end

#updated_atObject

Returns the value of attribute updated_at.



3
4
5
# File 'lib/iremix/video.rb', line 3

def updated_at
  @updated_at
end

#video_urlObject

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