Sha256: 95b54bcd43e484c0922bf2aced280bd51e46fb88a5981646e15d1eac5bca5caa

Contents?: true

Size: 828 Bytes

Versions: 14

Compression:

Stored size: 828 Bytes

Contents

module FbGraph
  class Video < Node
    include Connections::Comments
    include Connections::Likes

    attr_accessor :from, :message, :description, :length, :created_time, :updated_time

    def initialize(identifier, attributes = {})
      super
      if (from = attributes[:from])
        @from = if from[:category]
          FbGraph::Page.new(from.delete(:id), from)
        else
          FbGraph::User.new(from.delete(:id), from)
        end
      end
      @message     = attributes[:message]
      @description = attributes[:description]
      @length      = attributes[:length]
      if attributes[:created_time]
        @created_time = Time.parse(attributes[:created_time]).utc
      end
      if attributes[:updated_time]
        @updated_time = Time.parse(attributes[:updated_time]).utc
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
fb_graph-1.1.4 lib/fb_graph/video.rb
fb_graph-1.1.3 lib/fb_graph/video.rb
fb_graph-1.1.2 lib/fb_graph/video.rb
fb_graph-1.1.1 lib/fb_graph/video.rb
fb_graph-1.1.0 lib/fb_graph/video.rb
fb_graph-1.0.7 lib/fb_graph/video.rb
fb_graph-1.0.6 lib/fb_graph/video.rb
fb_graph-1.0.5 lib/fb_graph/video.rb
palidanx-fb_graph-1.0.4 lib/fb_graph/video.rb
fb_graph-1.0.4 lib/fb_graph/video.rb
fb_graph-1.0.3 lib/fb_graph/video.rb
fb_graph-1.0.2 lib/fb_graph/video.rb
fb_graph-1.0.1 lib/fb_graph/video.rb
fb_graph-1.0.0 lib/fb_graph/video.rb