Class: GraylogAPI::Alerts
- Inherits:
-
Object
- Object
- GraylogAPI::Alerts
- Defined in:
- lib/graylogapi/alerts.rb
Overview
class for manage stream alerts for all streams
Instance Method Summary collapse
- #by_id(id, options = {}) ⇒ Object
-
#initialize(client) ⇒ Alerts
constructor
A new instance of Alerts.
- #paginated(options = {}) ⇒ Object
- #recent(options = {}) ⇒ Object
Constructor Details
#initialize(client) ⇒ Alerts
Returns a new instance of Alerts.
4 5 6 |
# File 'lib/graylogapi/alerts.rb', line 4 def initialize(client) @client = client end |
Instance Method Details
#by_id(id, options = {}) ⇒ Object
16 17 18 |
# File 'lib/graylogapi/alerts.rb', line 16 def by_id(id, = {}) @client.json_request(:get, "/streams/alerts/#{id}", ) end |
#paginated(options = {}) ⇒ Object
12 13 14 |
# File 'lib/graylogapi/alerts.rb', line 12 def paginated( = {}) @client.json_reuqest(:get, '/streams/alerts/paginated', ) end |
#recent(options = {}) ⇒ Object
8 9 10 |
# File 'lib/graylogapi/alerts.rb', line 8 def recent( = {}) @client.json_request(:get, '/streams/alerts', ) end |