<commit_before>class ADM::Notification
  attr_reader :registration_id, :message

  def initialize registration_id, message
    if message.is_a?(Message)
      @message = message
    else
      @message = Message.new(message)
    end

    @registration_id = registration_id
  end

  def token
    ADM::AccessToken.get_token
  end

  def request
    @request ||= Typhoeus::Request.new(
      "https://api.amazon.com/messaging/registrations/#{registration_id}/messages",
      method: :post,
      body: message.compile,
      headers: {
        :Accept                 => :'application/json',
        :'Content-Type'         => :'application/json',
        :'X-Amzn-Type-Version'  => :'com.amazon.device.messaging.ADMMessage@1.0',
        :'X-Amzn-Accept-Type'   => :'com.amazon.device.messaging.ADMSendResult@1.0',
        :Authorization          => "Bearer #{token}"
      }
    )
  end

  def send
    request.run
  end

  def queue hydra
    hydra.queue(self)
  end
end
<commit_msg>fix for some syntax issues<commit_after>class ADM::Notification
  attr_reader :registration_id, :message

  def initialize registration_id, message
    if message.is_a?(ADM::Message)
      @message = message
    else
      @message = ADM::Message.new(message)
    end

    @registration_id = registration_id
  end

  def token
    ADM::AccessToken.get_token
  end

  def request
    @request ||= Typhoeus::Request.new(
      "https://api.amazon.com/messaging/registrations/#{registration_id}/messages",
      method: :post,
      body: message.compile,
      headers: {
        :Accept                 => :'application/json',
        :'Content-Type'         => :'application/json',
        :'X-Amzn-Type-Version'  => :'com.amazon.device.messaging.ADMMessage@1.0',
        :'X-Amzn-Accept-Type'   => :'com.amazon.device.messaging.ADMSendResult@1.0',
        :Authorization          => "Bearer #{token}"
      }
    )
  end

  def send
    request.run
  end

  def queue hydra
    hydra.queue(self.request)
  end
end

{'fraction_non_alphanumeric': 0.12756378189094547, 'fraction_numerical': 0.00400200100050025, 'mean_word_length': 2.484320557491289, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '6165149', 'n_tokens_mistral': 667, 'n_tokens_neox': 636, 'n_words': 116}