Class: GraylogAPI::System::Inputs
- Inherits:
-
Object
- Object
- GraylogAPI::System::Inputs
- Defined in:
- lib/graylogapi/system/inputs.rb
Overview
class for manage inputs
Instance Method Summary collapse
-
#all ⇒ Struct
get all inputs.
-
#by_id(id) ⇒ Struct
get input by input id.
-
#create(params = {}) ⇒ Struct
create input.
-
#delete(id, params = {}) ⇒ Struct
delete input.
-
#initialize(client) ⇒ Inputs
constructor
A new instance of Inputs.
-
#update(id, params = {}) ⇒ Struct
update input.
Constructor Details
#initialize(client) ⇒ Inputs
5 6 7 |
# File 'lib/graylogapi/system/inputs.rb', line 5 def initialize(client) @client = client end |
Instance Method Details
#all ⇒ Struct
get all inputs
12 13 14 |
# File 'lib/graylogapi/system/inputs.rb', line 12 def all @client.json_request(:get, '/system/inputs') end |
#by_id(id) ⇒ Struct
get input by input id
19 20 21 |
# File 'lib/graylogapi/system/inputs.rb', line 19 def by_id(id) @client.json_request(:get, "/system/inputs/#{id}") end |
#create(params = {}) ⇒ Struct
create input
27 28 29 |
# File 'lib/graylogapi/system/inputs.rb', line 27 def create(params = {}) @client.json_request(:post, '/system/inputs', params) end |
#delete(id, params = {}) ⇒ Struct
delete input
43 44 45 |
# File 'lib/graylogapi/system/inputs.rb', line 43 def delete(id, params = {}) @client.json_request(:delete, "/system/inputs/#{id}", params) end |
#update(id, params = {}) ⇒ Struct
update input
35 36 37 |
# File 'lib/graylogapi/system/inputs.rb', line 35 def update(id, params = {}) @client.json_request(:put, "/system/inputs/#{id}", params) end |