<commit_before>require 'arbetsformedlingen/soap_builder'
require 'arbetsformedlingen/api/soap_request'

module Arbetsformedlingen
  module API
    class WSOccupationClient
      attr_reader :request

      BASE_URL = 'https://api.arbetsformedlingen.se/af/v0/Occupation'.freeze

      def initialize(locale: 'sv')
        @request = request || SOAPRequest.new(base_url: BASE_URL, locale: locale)
      end

      def occupation(id)
        soap_body = Arbetsformedlingen::SOAPBuilder.wrap do |body|
          body.GetOccupationById(xmlns: 'urn:ams.se:wsoccupation') do |node|<commit_msg>Remove locale option from WSOccupationClient since the API doesn't support it<commit_after>require 'arbetsformedlingen/soap_builder'
require 'arbetsformedlingen/api/soap_request'

module Arbetsformedlingen
  module API
    class WSOccupationClient
      attr_reader :request

      BASE_URL = 'https://api.arbetsformedlingen.se/af/v0/Occupation'.freeze

      def initialize
        @request = request || SOAPRequest.new(base_url: BASE_URL)
      end

      def occupation(id)
        soap_body = Arbetsformedlingen::SOAPBuilder.wrap do |body|
          body.GetOccupationById(xmlns: 'urn:ams.se:wsoccupation') do |node|
{'fraction_non_alphanumeric': 0.08955223880597014, 'fraction_numerical': 0.001658374792703151, 'mean_word_length': 3.94672131147541, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2396644', 'n_tokens_mistral': 396, 'n_tokens_neox': 385, 'n_words': 74}