Module: GSGraph::Connections::Outbox

Included in:
User
Defined in:
lib/gs_graph/connections/outbox.rb

Instance Method Summary collapse

Instance Method Details

#outbox(options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/gs_graph/connections/outbox.rb', line 4

def outbox(options = {})
  threads = self.connection :outbox, options
  threads.map! do |thread|
    if thread[:comments]
      Thread::BeforeTransition.new thread[:id], thread.merge(
        :access_token => options[:access_token] || self.access_token
      )
    else
      Thread.new thread[:id], thread.merge(
        :access_token => options[:access_token] || self.access_token
      )
    end
  end
end