Class: Believe::Resources::Reframe

Inherits:
Object
  • Object
show all
Defined in:
lib/believe/resources/reframe.rb

Overview

Interactive endpoints for motivation and guidance

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Reframe

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 Reframe.

Parameters:



34
35
36
# File 'lib/believe/resources/reframe.rb', line 34

def initialize(client:)
  @client = client
end

Instance Method Details

#transform_negative_thoughts(negative_thought:, recurring: nil, request_options: {}) ⇒ ::Believe::Models::ReframeTransformNegativeThoughtsResponse

Transform negative thoughts into positive perspectives with Ted’s help.

Parameters:

  • negative_thought (String)

    The negative thought to reframe

  • recurring (Boolean)

    Is this a recurring thought?

  • request_options (::Believe::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



20
21
22
23
24
25
26
27
28
29
# File 'lib/believe/resources/reframe.rb', line 20

def transform_negative_thoughts(params)
  parsed, options = ::Believe::ReframeTransformNegativeThoughtsParams.dump_request(params)
  @client.request(
    method: :post,
    path: "reframe",
    body: parsed,
    model: ::Believe::Models::ReframeTransformNegativeThoughtsResponse,
    options: options
  )
end