Sha256: 5b98a68df8d0f36a968e31f10e0ff9ac6dc06f8d35341cbdbde4091ac9a24205

Contents?: true

Size: 800 Bytes

Versions: 18

Compression:

Stored size: 800 Bytes

Contents

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

    attr_accessor :from, :subject, :message, :created_time, :updated_time, :icon

    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
      @subject = attributes[:subject]
      @message = attributes[:message]
      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
      @icon = attributes[:icon]
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
fb_graph-1.1.4 lib/fb_graph/note.rb
fb_graph-1.1.3 lib/fb_graph/note.rb
fb_graph-1.1.2 lib/fb_graph/note.rb
fb_graph-1.1.1 lib/fb_graph/note.rb
fb_graph-1.1.0 lib/fb_graph/note.rb
fb_graph-1.0.7 lib/fb_graph/note.rb
fb_graph-1.0.6 lib/fb_graph/note.rb
fb_graph-1.0.5 lib/fb_graph/note.rb
palidanx-fb_graph-1.0.4 lib/fb_graph/note.rb
fb_graph-1.0.4 lib/fb_graph/note.rb
fb_graph-1.0.3 lib/fb_graph/note.rb
fb_graph-1.0.2 lib/fb_graph/note.rb
fb_graph-1.0.1 lib/fb_graph/note.rb
fb_graph-1.0.0 lib/fb_graph/note.rb
fb_graph-0.8.0 lib/fb_graph/note.rb
fb_graph-0.7.3 lib/fb_graph/note.rb
fb_graph-0.7.2 lib/fb_graph/note.rb
fb_graph-0.7.1 lib/fb_graph/note.rb