Class: Believe::Resources::Believe

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

Overview

Interactive endpoints for motivation and guidance

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Believe

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

Parameters:



38
39
40
# File 'lib/believe/resources/believe.rb', line 38

def initialize(client:)
  @client = client
end

Instance Method Details

#submit(situation:, situation_type:, context: nil, intensity: nil, request_options: {}) ⇒ ::Believe::Models::BelieveSubmitResponse

Submit your situation and receive Ted Lasso-style motivational guidance.

Parameters:

Returns:

See Also:



24
25
26
27
28
29
30
31
32
33
# File 'lib/believe/resources/believe.rb', line 24

def submit(params)
  parsed, options = ::Believe::BelieveSubmitParams.dump_request(params)
  @client.request(
    method: :post,
    path: "believe",
    body: parsed,
    model: ::Believe::Models::BelieveSubmitResponse,
    options: options
  )
end