Class: LogentriesPullApi::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/logentries_pull_api/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(account_key, log_set_key, log_key) ⇒ Client

Returns a new instance of Client.



11
12
13
14
15
# File 'lib/logentries_pull_api/client.rb', line 11

def initialize(, log_set_key, log_key)
  @account_key = 
  @log_set_key = log_set_key
  @log_key = log_key
end

Instance Attribute Details

#account_keyObject (readonly)

Returns the value of attribute account_key.



9
10
11
# File 'lib/logentries_pull_api/client.rb', line 9

def 
  @account_key
end

#log_keyObject (readonly)

Returns the value of attribute log_key.



9
10
11
# File 'lib/logentries_pull_api/client.rb', line 9

def log_key
  @log_key
end

#log_set_keyObject (readonly)

Returns the value of attribute log_set_key.



9
10
11
# File 'lib/logentries_pull_api/client.rb', line 9

def log_set_key
  @log_set_key
end

Instance Method Details

#get(options = {}) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/logentries_pull_api/client.rb', line 18

def get(options = {})
  response = fetch_response_from assemble_uri(options)

  raise LogentriesPullApi::Error, response['reason'] if response.is_a? Hash

  response
end