Class: Intrinsic::Client

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key:, environment: Environment::DEFAULT, max_retries: nil, timeout_in_seconds: nil) ⇒ Client

Parameters:

  • environment (Environment) (defaults to: Environment::DEFAULT)
  • max_retries (Long) (defaults to: nil)

    The number of times to retry a failed request, defaults to 2.

  • timeout_in_seconds (Long) (defaults to: nil)
  • api_key (String)


19
20
21
22
23
24
25
# File 'lib/intrinsic.rb', line 19

def initialize(api_key:, environment: Environment::DEFAULT, max_retries: nil, timeout_in_seconds: nil)
  @request_client = RequestClient.new(environment: environment, max_retries: max_retries,
                                      timeout_in_seconds: timeout_in_seconds, api_key: api_key)
  @detections = DetectionsClient.new(request_client: @request_client)
  @events = EventsClient.new(request_client: @request_client)
  @event_types = EventTypesClient.new(request_client: @request_client)
end

Instance Attribute Details

#detectionsObject (readonly)

Returns the value of attribute detections.



12
13
14
# File 'lib/intrinsic.rb', line 12

def detections
  @detections
end

#event_typesObject (readonly)

Returns the value of attribute event_types.



12
13
14
# File 'lib/intrinsic.rb', line 12

def event_types
  @event_types
end

#eventsObject (readonly)

Returns the value of attribute events.



12
13
14
# File 'lib/intrinsic.rb', line 12

def events
  @events
end