def sample(hash = '', count = nil, start_time = nil, end_time = nil, filter = '', id = '', service = 'facebook')
      fail BadParametersError, 'hash or id is required' if hash.empty? && id.empty?
      fail BadParametersError, 'service is required' if service.empty?

      params = {}
      params.merge!(hash: hash) unless hash.empty?
      params.merge!(id: id) unless id.empty?
      params.merge!(count: count) unless count.nil?
      params.merge!(start_time: start_time) unless start_time.nil?
      params.merge!(end_time: end_time) unless end_time.nil?

      if filter.empty?
        DataSift.request(:GET, build_path(service, 'pylon/sample', @config), @config, params)
      else
        params.merge!(filter: filter)
        DataSift.request(:POST, build_path(service, 'pylon/sample', @config), @config, params)
      end
    end
def sample(hash = '', count = nil, start_time = nil, end_time = nil, filter = '', id = '', service = 'facebook')
      fail BadParametersError, 'hash or id is required' if hash.empty? && id.empty?
      fail BadParametersError, 'service is required' if service.empty?

      params = {}
      params.merge!(hash: hash) unless hash.empty?
      params.merge!(id: id) unless id.empty?
      params.merge!(count: count) unless count.nil?
      params.merge!(start_time: start_time) unless start_time.nil?
      params.merge!(end_time: end_time) unless end_time.nil?

      if filter.empty?
        DataSift.request(:GET, build_path(service, 'pylon/sample', @config), @config, params)
      else
        params.merge!(filter: filter)
        DataSift.request(:POST, build_path(service, 'pylon/sample', @config), @config, params)
      end
    end
Hit the PYLON Sample endpoint to pull public sample data from a PYLON recording

 @param hash [String] The CSDL hash that identifies the recording you want to sample
 @param count [Integer] Optional number of public interactions you wish to receive
 @param start_time [Integer] Optional start timestamp for filtering by date
 @param end_time [Integer] Optional end timestamp for filtering by date
 @param filter [String] Optional PYLON CSDL for a query filter
 @param id [String] ID of the recording you wish to sample
 @param service [String] The PYLON service to make this API call against
 @return [Object] API reponse object