<commit_before>require "net/http"
require "open-uri"
 
module XboxApi
  class Gamer

    attr_reader :gamertag
    attr_accessor :xuid

    ENDPOINTS = [
      :presence,
      :profile,
      :gamercard,
      :activity,
      :friends,
      :followers,
      :xbox360games,
      :xboxonegames
    ]

    def initialize(gamertag, client)
      @gamertag = gamertag
      @client   = client
      @xuid     = fetch_xuid
    end

    ENDPOINTS.each do |action|
      define_method( action ) do
        endpoint = "#{xuid}/#{__method__}"
        client.fetch_body_and_parse( endpoint )
      end
    end<commit_msg>make xuid reader only<commit_after>require "net/http"
require "open-uri"
 
module XboxApi
  class Gamer

    attr_reader :gamertag, :xuid

    ENDPOINTS = [
      :presence,
      :profile,
      :gamercard,
      :activity,
      :friends,
      :followers,
      :xbox360games,
      :xboxonegames
    ]

    def initialize(gamertag, client)
      @gamertag = gamertag
      @client   = client
      @xuid     = fetch_xuid
    end

    ENDPOINTS.each do |action|
      define_method( action ) do
        endpoint = "#{xuid}/#{__method__}"
        client.fetch_body_and_parse( endpoint )
      end
    end
{'fraction_non_alphanumeric': 0.09254709254709255, 'fraction_numerical': 0.004914004914004914, 'mean_word_length': 2.125319693094629, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1640630', 'n_tokens_mistral': 436, 'n_tokens_neox': 421, 'n_words': 87}