Class: GraylogAPI::System::Inputs
- Inherits:
-
Object
- Object
- GraylogAPI::System::Inputs
- Defined in:
- lib/graylogapi/system/inputs.rb,
lib/graylogapi/system/inputs/types.rb
Overview
class for manage inputs
Defined Under Namespace
Classes: Types
Instance Method Summary collapse
-
#all ⇒ GraylogAPI::Client::Response
get all inputs.
-
#by_id(id) ⇒ GraylogAPI::Client::Response
get input by input id.
-
#create(params = {}) ⇒ GraylogAPI::Client::Response
create input.
-
#delete(id) ⇒ GraylogAPI::Client::Response
delete input.
-
#initialize(client) ⇒ Inputs
constructor
A new instance of Inputs.
-
#types ⇒ GraylogAPI::System::Inputs::Types
object for get information about input types.
-
#update(id, params = {}) ⇒ GraylogAPI::Client::Response
update input.
Constructor Details
#initialize(client) ⇒ Inputs
Returns a new instance of Inputs.
7 8 9 |
# File 'lib/graylogapi/system/inputs.rb', line 7 def initialize(client) @client = client end |
Instance Method Details
#all ⇒ GraylogAPI::Client::Response
get all inputs
14 15 16 |
# File 'lib/graylogapi/system/inputs.rb', line 14 def all @client.request(:get, '/system/inputs') end |
#by_id(id) ⇒ GraylogAPI::Client::Response
get input by input id
21 22 23 |
# File 'lib/graylogapi/system/inputs.rb', line 21 def by_id(id) @client.request(:get, "/system/inputs/#{id}") end |
#create(params = {}) ⇒ GraylogAPI::Client::Response
create input
29 30 31 |
# File 'lib/graylogapi/system/inputs.rb', line 29 def create(params = {}) @client.request(:post, '/system/inputs', parse(params)) end |
#delete(id) ⇒ GraylogAPI::Client::Response
delete input
45 46 47 |
# File 'lib/graylogapi/system/inputs.rb', line 45 def delete(id) @client.request(:delete, "/system/inputs/#{id}") end |
#types ⇒ GraylogAPI::System::Inputs::Types
object for get information about input types
52 53 54 |
# File 'lib/graylogapi/system/inputs.rb', line 52 def types @types ||= Types.new(@client) end |
#update(id, params = {}) ⇒ GraylogAPI::Client::Response
update input
37 38 39 |
# File 'lib/graylogapi/system/inputs.rb', line 37 def update(id, params = {}) @client.request(:put, "/system/inputs/#{id}", parse(params)) end |