Sha256: 82dea965568bbf7c182a8bdb5198472953d18337361f090e151531eca532264f

Contents?: true

Size: 446 Bytes

Versions: 2

Compression:

Stored size: 446 Bytes

Contents

require 'papertrail_rails/request'

module PapertrailRails
  @api_key = nil

  def self.api_key=(api_key)
    @api_key = api_key
    PapertrailRails::Request.set_default_headers(api_key)
  end

  def self.api_key
    @api_key
  end

  def self.search_status(query)
    PapertrailRails::Request.get("/events/search.json?q=status=", query)
  end

  def self.search(query)
    PapertrailRails::Request.get('/events/search.json?q=', query)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
papertrail_rails-0.0.4 lib/papertrail_rails.rb
papertrail_rails-0.0.3 lib/papertrail_rails.rb