Sha256: 41998edd64c98b423ee8d25d27824534d69d4d9a1af762711c04c25bb53b8e95

Contents?: true

Size: 647 Bytes

Versions: 39

Compression:

Stored size: 647 Bytes

Contents

module FbGraph
  module Connections
    module Accounts
      def accounts(options = {})
        accounts = self.connection :accounts, options
        accounts.map! do |account|
          account[:access_token] ||= options[:access_token] || self.access_token
          case self
          when User
            if account[:category] == 'Application'
              account.delete(:category)
              Application.new account[:id], account
            else
              Page.new account[:id], account
            end
          when Application
            TestUser.new account[:id], account
          end
        end
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
fb_graph-2.7.17 lib/fb_graph/connections/accounts.rb
fb_graph-2.7.16 lib/fb_graph/connections/accounts.rb
fb_graph-2.7.15 lib/fb_graph/connections/accounts.rb
fb_graph-2.7.14 lib/fb_graph/connections/accounts.rb
fb_graph-2.7.13 lib/fb_graph/connections/accounts.rb
fb_graph-2.7.12 lib/fb_graph/connections/accounts.rb
fb_graph-2.7.11 lib/fb_graph/connections/accounts.rb
fb_graph-2.7.10 lib/fb_graph/connections/accounts.rb
fb_graph-2.7.9 lib/fb_graph/connections/accounts.rb
fb_graph-2.7.8 lib/fb_graph/connections/accounts.rb
fb_graph-2.7.7 lib/fb_graph/connections/accounts.rb
fb_graph-2.7.6 lib/fb_graph/connections/accounts.rb
fb_graph-2.7.5 lib/fb_graph/connections/accounts.rb
fb_graph-2.7.4 lib/fb_graph/connections/accounts.rb
fb_graph-2.7.3 lib/fb_graph/connections/accounts.rb
fb_graph-2.7.2 lib/fb_graph/connections/accounts.rb
fb_graph-2.7.1 lib/fb_graph/connections/accounts.rb
fb_graph-2.7.0 lib/fb_graph/connections/accounts.rb
fb_graph-2.6.7 lib/fb_graph/connections/accounts.rb
fb_graph-2.6.6 lib/fb_graph/connections/accounts.rb