<commit_before>require 'addressable/uri'

module Trello
  class Client
    class << self
      def get(path, params = {})
        api_version = 1

        uri = Addressable::URI.parse("https://api.trello.com/#{api_version}#{path}")
        uri.query_values = params unless params.empty?

        request = Request.new :get, uri, {}

        response = TInternet.get AuthPolicy.authorize(request)

        raise Error, response.body if response.code.to_i != 200

        response.body
      end
    end
  end
end<commit_msg>Refactor: inverted status code check<commit_after>require 'addressable/uri'

module Trello
  class Client
    class << self
      def get(path, params = {})
        api_version = 1

        uri = Addressable::URI.parse("https://api.trello.com/#{api_version}#{path}")
        uri.query_values = params unless params.empty?

        request = Request.new :get, uri, {}

        response = TInternet.get AuthPolicy.authorize(request)

        raise Error, response.body unless response.code.to_i == 200

        response.body
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.10904007455731593, 'fraction_numerical': 0.007455731593662628, 'mean_word_length': 2.568106312292359, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '193877', 'n_tokens_mistral': 334, 'n_tokens_neox': 314, 'n_words': 77}