Sha256: f2f8a51cfd8120aa18d030b38c2df66c8e0d30e022eee3668380c16e203869b8

Contents?: true

Size: 770 Bytes

Versions: 19

Compression:

Stored size: 770 Bytes

Contents

module FbGraph2
  class Edge
    module AppLinkHosts
      def app_link_hosts(params = {})
        hosts = self.edge :app_link_hosts, params
        hosts.collect! do |host|
          AppLinkHost.new(host[:id], host).authenticate self.access_token
        end
      end

      def app_link_host!(params = {})
        jsonized_params = params.inject({}) do |jsonized_params, (key, value)|
          jsonized_param = case value
          when Hash, Array
            value.to_json
          else
            value
          end
          jsonized_params.merge! key => jsonized_param
        end
        host = self.post jsonized_params, edge: :app_link_hosts
        AppLinkHost.new(host[:id], params.merge(host)).authenticate self.access_token
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
fb_graph2-1.3.0 lib/fb_graph2/edge/app_link_hosts.rb
fb_graph2-1.2.0 lib/fb_graph2/edge/app_link_hosts.rb
fb_graph2-1.1.1 lib/fb_graph2/edge/app_link_hosts.rb
fb_graph2-1.1.0 lib/fb_graph2/edge/app_link_hosts.rb
fb_graph2-1.0.1 lib/fb_graph2/edge/app_link_hosts.rb
fb_graph2-1.0.0 lib/fb_graph2/edge/app_link_hosts.rb
fb_graph2-0.9.1 lib/fb_graph2/edge/app_link_hosts.rb
fb_graph2-0.9.0 lib/fb_graph2/edge/app_link_hosts.rb
fb_graph2-0.8.0 lib/fb_graph2/edge/app_link_hosts.rb
fb_graph2-0.7.9 lib/fb_graph2/edge/app_link_hosts.rb
fb_graph2-0.7.8 lib/fb_graph2/edge/app_link_hosts.rb
fb_graph2-0.7.7 lib/fb_graph2/edge/app_link_hosts.rb
fb_graph2-0.7.6 lib/fb_graph2/edge/app_link_hosts.rb
fb_graph2-0.7.5 lib/fb_graph2/edge/app_link_hosts.rb
fb_graph2-0.7.4 lib/fb_graph2/edge/app_link_hosts.rb
fb_graph2-0.7.3 lib/fb_graph2/edge/app_link_hosts.rb
fb_graph2-0.7.2 lib/fb_graph2/edge/app_link_hosts.rb
fb_graph2-0.7.1 lib/fb_graph2/edge/app_link_hosts.rb
fb_graph2-0.7.0 lib/fb_graph2/edge/app_link_hosts.rb