Class: Flickrie::Video

Inherits:
Object
  • Object
show all
Includes:
Media
Defined in:
lib/flickrie/objects/video.rb

Constant Summary

Constants included from Base58

Base58::ALPHABET

Instance Attribute Summary collapse

Attributes included from Media

#camera, #can_add_meta?, #can_blog?, #can_comment?, #can_download?, #can_everyone_add_meta?, #can_everyone_comment?, #can_print?, #can_share?, #comments_count, #description, #exif, #farm, #faved?, #favorite?, #favorites, #geo_permissions, #has_people?, #hash, #id, #license, #location, #machine_tags, #media_status, #moderate?, #notes, #owner, #path_alias, #posted_at, #primary?, #restricted?, #safe?, #safety_level, #secret, #server, #short_url, #tags, #taken_at, #taken_at_granularity, #title, #updated_at, #uploaded_at, #url, #views_count, #visibility

Instance Method Summary collapse

Methods included from Media

#[], #adding_meta_permissions, #commenting_permissions, #content_type, #get_exif, #get_favorites

Methods included from Media::ClassMethods

#new_collection

Methods included from Base58

#to_base58

Instance Attribute Details

#download_urlString (readonly)

Returns:

  • (String)


26
27
28
# File 'lib/flickrie/objects/video.rb', line 26

def download_url
  @download_url
end

#durationFixnum (readonly)

Returns:

  • (Fixnum)


16
17
18
# File 'lib/flickrie/objects/video.rb', line 16

def duration
  @duration
end

#failed?Boolean (readonly)

Returns:

  • (Boolean)


11
12
13
# File 'lib/flickrie/objects/video.rb', line 11

def failed?
  @failed?
end

#heightFixnum (readonly)

Returns:

  • (Fixnum)


21
22
23
# File 'lib/flickrie/objects/video.rb', line 21

def height
  @height
end

#mobile_download_urlString (readonly)

Returns:

  • (String)


28
29
30
# File 'lib/flickrie/objects/video.rb', line 28

def mobile_download_url
  @mobile_download_url
end

#pending?Boolean (readonly)

Returns:

  • (Boolean)


13
14
15
# File 'lib/flickrie/objects/video.rb', line 13

def pending?
  @pending?
end

#ready?Boolean (readonly)

Returns:

  • (Boolean)


9
10
11
# File 'lib/flickrie/objects/video.rb', line 9

def ready?
  @ready?
end

#source_urlString (readonly)

Returns:

  • (String)


24
25
26
# File 'lib/flickrie/objects/video.rb', line 24

def source_url
  @source_url
end

#widthFixnum (readonly)

Returns:

  • (Fixnum)


19
20
21
# File 'lib/flickrie/objects/video.rb', line 19

def width
  @width
end

Instance Method Details

#get_info(params = {}) ⇒ self

Same as calling Flickrie.get_video_info(video.id).

Returns:

  • (self)


43
44
45
46
47
# File 'lib/flickrie/objects/video.rb', line 43

def get_info(params = {})
  super
  @video = @hash['video']
  self
end

#get_sizes(params = {}) ⇒ self

This fetches the #source_url, #download_url and the #mobile_download_url. Same as calling Flickrie.get_video_sizes(video.id)

Returns:

  • (self)


34
35
36
37
38
# File 'lib/flickrie/objects/video.rb', line 34

def get_sizes(params = {})
  @hash.deep_merge!(@api_caller.get_video_sizes(id, params).hash)
  @video = @hash['video']
  self
end