Class: Facebooker::Service::BaseService

Inherits:
Object
  • Object
show all
Defined in:
lib/facebooker/service/base_service.rb

Direct Known Subclasses

CurlService, NetHttpService, TyphoeusService

Instance Method Summary (collapse)

Instance Method Details

- (Boolean) parse_results?



2
3
4
# File 'lib/facebooker/service/base_service.rb', line 2

def parse_results?
  true
end

- (Object) post_params(params)



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/facebooker/service/base_service.rb', line 6

def post_params(params)
  post_params = {}
  params.each do |k,v|
    k = k.to_s unless k.is_a?(String)
    if Array === v || Hash === v
      post_params[k] = Facebooker.json_encode(v)       
    else
      post_params[k] = v
    end
  end
  post_params
end