Module: PapertrailRails

Defined in:
lib/papertrail_rails.rb,
lib/papertrail_rails/request.rb

Defined Under Namespace

Classes: Request

Class Method Summary collapse

Class Method Details

.api_keyObject



11
12
13
# File 'lib/papertrail_rails.rb', line 11

def self.api_key
  @api_key
end

.api_key=(api_key) ⇒ Object



6
7
8
9
# File 'lib/papertrail_rails.rb', line 6

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

.search(query) ⇒ Object



19
20
21
# File 'lib/papertrail_rails.rb', line 19

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

.search_status(query) ⇒ Object



15
16
17
# File 'lib/papertrail_rails.rb', line 15

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