Class: Intrinsic::AsyncClient

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) ⇒ AsyncClient

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)


36
37
38
39
40
41
42
# File 'lib/intrinsic.rb', line 36

def initialize(api_key:, environment: Environment::DEFAULT, max_retries: nil, timeout_in_seconds: nil)
  @async_request_client = AsyncRequestClient.new(environment: environment, max_retries: max_retries,
                                                 timeout_in_seconds: timeout_in_seconds, api_key: api_key)
  @detections = AsyncDetectionsClient.new(request_client: @async_request_client)
  @events = AsyncEventsClient.new(request_client: @async_request_client)
  @event_types = AsyncEventTypesClient.new(request_client: @async_request_client)
end

Instance Attribute Details

#detectionsObject (readonly)

Returns the value of attribute detections.



29
30
31
# File 'lib/intrinsic.rb', line 29

def detections
  @detections
end

#event_typesObject (readonly)

Returns the value of attribute event_types.



29
30
31
# File 'lib/intrinsic.rb', line 29

def event_types
  @event_types
end

#eventsObject (readonly)

Returns the value of attribute events.



29
30
31
# File 'lib/intrinsic.rb', line 29

def events
  @events
end