<commit_before>require File.join(File.dirname(__FILE__), 'helpers')

module Redphone
  class Statuspage
    def initialize(options={})
      has_options(options, [:api_key, :page_id])
      @page_id = options[:page_id]
      @request_options = {
        :ssl => true,
        :headers => {"Authorization" => "OAuth #{options[:api_key]}"}
      }
      @api_url = "https://api.statuspage.io/v1/pages/#{@page_id}/"
    end

    def convert_options(options={})
      incident_options = Hash.new
      options.each do |key, val|
        incident_options["incident[#{key}]"] = val
      end
      return incident_options
    end

    def check_attributes(options={}, checked_options=[])
      checked_options.each do |option|
        raise "You must supply an incident #{option}." if options[option].nil?
      end
    end

    def get_all_incidents()
      response = http_request(
        @request_options.merge({<commit_msg>Update statuspage.rb<commit_after>require File.join(File.dirname(__FILE__), 'helpers')

module Redphone
  class Statuspage
    def initialize(options={})
      has_options(options, [:api_key, :page_id])
      @proxy_address = options[:proxy_address]
      @proxy_port = options[:proxy_port]
      @page_id = options[:page_id]
      @request_options = {
        :ssl => true,
        :headers => {"Authorization" => "OAuth #{options[:api_key]}"}
      }
      @api_url = "https://api.statuspage.io/v1/pages/#{@page_id}/"
    end

    def convert_options(options={})
      incident_options = Hash.new
      options.each do |key, val|
        incident_options["incident[#{key}]"] = val
      end
      return incident_options
    end

    def check_attributes(options={}, checked_options=[])
      checked_options.each do |option|
        raise "You must supply an incident #{option}." if options[option].nil?
      end
    end

    def get_all_incidents()
      response = http_request(
        @request_options.merge({
{'fraction_non_alphanumeric': 0.13254254770500257, 'fraction_numerical': 0.0010314595152140279, 'mean_word_length': 3.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '5418543', 'n_tokens_mistral': 597, 'n_tokens_neox': 600, 'n_words': 124}