Sha256: c5d09ecb80cc85fa632a0ca498e93431044a9ddc91633b8049821b1bf7b34201

Contents?: true

Size: 956 Bytes

Versions: 18

Compression:

Stored size: 956 Bytes

Contents

module FbGraph
  class Thread < Node
    include Connections::Messages
    include Connections::Participants
    include Connections::FormerParticipants
    include Connections::Senders
    include Connections::Tags

    attr_accessor :snippet, :message_count, :unread_count, :updated_time

    def initialize(identifier, attributes = {})
      super
      @snippet = attributes[:snippet]
      @message_count = attributes[:message_count]
      @unread_count = attributes[:unread_count].to_i
      if attributes[:updated_time]
        @updated_time = Time.parse(attributes[:updated_time]).utc
      end

      # cached connection
      @_messages_ = Collection.new(attributes[:messages])
      @_participants_ = Collection.new(attributes[:participants])
      @_former_participants_ = Collection.new(attributes[:former_articipants])
      @_senders_ = Collection.new(attributes[:senders])
      @_tags_ = Collection.new(attributes[:tags])
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
fb_graph-2.1.5 lib/fb_graph/thread.rb
fb_graph-2.1.4 lib/fb_graph/thread.rb
fb_graph-2.1.3 lib/fb_graph/thread.rb
fb_graph-2.1.2 lib/fb_graph/thread.rb
fb_graph-2.1.1 lib/fb_graph/thread.rb
fb_graph-2.1.0 lib/fb_graph/thread.rb
fb_graph-2.1.0.alpha lib/fb_graph/thread.rb
fb_graph-2.0.2 lib/fb_graph/thread.rb
fb_graph-2.0.1 lib/fb_graph/thread.rb
fb_graph-2.0.0 lib/fb_graph/thread.rb
fb_graph-2.0.0.beta lib/fb_graph/thread.rb
fb_graph-2.0.0.alpha lib/fb_graph/thread.rb
fb_graph-1.9.5 lib/fb_graph/thread.rb
fb_graph-1.9.4 lib/fb_graph/thread.rb
fb_graph-1.9.3 lib/fb_graph/thread.rb
fb_graph-1.9.2 lib/fb_graph/thread.rb
fb_graph-1.9.1 lib/fb_graph/thread.rb
fb_graph-1.9.0 lib/fb_graph/thread.rb