class Adparlor::Facebook::GraphApi::AdsPixelStat

Public Instance Methods

get(path, options) click to toggle source
Calls superclass method
# File lib/adparlor/facebook/graph_api/ads_pixel_stat.rb, line 9
def get(path, options)
  validate_options(options)
  super(path, options)
end

Private Instance Methods

validate_options(options) click to toggle source
# File lib/adparlor/facebook/graph_api/ads_pixel_stat.rb, line 16
def validate_options(options)
  options.delete(:fields) # just not required for this request so ignore them if they are passed
  raise FbError.new('invalid parameters passed', 500) if
    (options.keys.map(&:to_s) - %w(access_token aggregation end_time event start_time id)).any?
  raise FbError.new('required parameter aggregation missing', 500) if options[:aggregation].nil?
end