Class: PostHog::Response Private

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

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

API response wrapper returned by the SDK transport.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status = 200, error = nil) ⇒ Response

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Response.

Parameters:

  • status (Integer) (defaults to: 200)

    HTTP status code, or -1 for SDK/transport errors.

  • error (String, nil) (defaults to: nil)

    Error message returned by the API or SDK.



12
13
14
15
# File 'lib/posthog/response.rb', line 12

def initialize(status = 200, error = nil)
  @status = status
  @error = error
end

Instance Attribute Details

#errorObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
# File 'lib/posthog/response.rb', line 8

def error
  @error
end

#statusObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
# File 'lib/posthog/response.rb', line 8

def status
  @status
end