<commit_before>module Eligible

  class Coverage < APIResource

    def self.get(params, api_key=nil)
      response, api_key = Eligible.request(:get, url, api_key, params)
      Util.convert_to_eligible_object(response, api_key)      
    end

    def all
      error ? nil : to_hash
    end

  end

end<commit_msg>add post batch to coverage<commit_after>module Eligible

  class Coverage < APIResource

    def self.get(params, api_key=nil)
      response, api_key = Eligible.request(:get, url, api_key, params)
      Util.convert_to_eligible_object(response, api_key)      
    end

    def all
      error ? nil : to_hash
    end



    def self.batch_post(params, api_key=nil)
      #https://gds.eligibleapi.com/v1.1/coverage/all/batch.json
      response, api_key = Eligible.request(:post, '/coverage/all/batch.json', api_key, params)
      Util.convert_to_eligible_object(response, api_key)
    end
  end

end
{'fraction_non_alphanumeric': 0.09170305676855896, 'fraction_numerical': 0.002183406113537118, 'mean_word_length': 3.09375, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5182970', 'n_tokens_mistral': 316, 'n_tokens_neox': 306, 'n_words': 66}