<commit_before>require 'json'
require 'httparty'
require './nypl_collections/configuration'
require 'pry'
require 'dotenv'
Dotenv.load "../.env"

module Collections
  class Client
    include Collections::Configuration
    include HTTParty

    def initialize
      reset
    end

    def return_captures_for_uuid(options= {})
      token = auth_token

      if options == "withTitles"
        withTitles = "withTitles=yes"
      end

      HTTParty.get("http://api.repo.nypl.org/api/v1/items/5fa75050-c6c7-012f-e24b-58d385a7bc34?#{withTitles}",
        :headers => {
          "Authorization" => "Token token=#{token}"
        })
    end

  end
end



@client = Collections::Client.new
@client.configure do |config|
  config.auth_token = ENV['AUTH_TOKEN']
end<commit_msg>set up client methods<commit_after>require 'json'
require 'httparty'
require './nypl_collections/configuration'
require 'pry'
require 'dotenv'
Dotenv.load "../.env"

module Collections
  class Client
    include Collections::Configuration
    include HTTParty

    def initialize
      reset
    end

    def return_captures_for_uuid(options= {})
      token = auth_token

      if options == "withTitles"
        withTitles = "withTitles=yes"
      end

      HTTParty.get("http://api.repo.nypl.org/api/v1/items/5fa75050-c6c7-012f-e24b-58d385a7bc34?#{withTitles}",
        :headers => {
          "Authorization" => "Token token=#{token}"
        })
    end

    def return_uuid_for_local_identifier
    end

    def search_in_mods_field
    end

    def search_all_mods_fields
    end

    def return_mods_record_for_capture_uuid

  end
end



@client = Collections::Client.new
@client.configure do |config|
  config.auth_token = ENV['AUTH_TOKEN']
end
{'fraction_non_alphanumeric': 0.10782608695652174, 'fraction_numerical': 0.025507246376811593, 'mean_word_length': 3.0997624703087885, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '4986734', 'n_tokens_mistral': 610, 'n_tokens_neox': 577, 'n_words': 113}