Class: Believe::Resources::Coaching::Principles
- Inherits:
-
Object
- Object
- Believe::Resources::Coaching::Principles
- Defined in:
- lib/believe/resources/coaching/principles.rb
Overview
Interactive endpoints for motivation and guidance
Instance Method Summary collapse
-
#get_random(request_options: {}) ⇒ ::Believe::Models::Coaching::CoachingPrinciple
Get a random coaching principle to inspire your day.
-
#initialize(client:) ⇒ Principles
constructor
private
A new instance of Principles.
-
#list(limit: nil, skip: nil, request_options: {}) ⇒ ::Believe::Internal::SkipLimitPage<::Believe::Models::Coaching::CoachingPrinciple>
Get a paginated list of Ted Lasso’s core coaching principles and philosophy.
-
#retrieve(principle_id, request_options: {}) ⇒ ::Believe::Models::Coaching::CoachingPrinciple
Get details about a specific coaching principle.
Constructor Details
#initialize(client:) ⇒ Principles
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 Principles.
74 75 76 |
# File 'lib/believe/resources/coaching/principles.rb', line 74 def initialize(client:) @client = client end |
Instance Method Details
#get_random(request_options: {}) ⇒ ::Believe::Models::Coaching::CoachingPrinciple
Get a random coaching principle to inspire your day.
62 63 64 65 66 67 68 69 |
# File 'lib/believe/resources/coaching/principles.rb', line 62 def get_random(params = {}) @client.request( method: :get, path: "coaching/principles/random", model: ::Believe::Coaching::CoachingPrinciple, options: params[:request_options] ) end |
#list(limit: nil, skip: nil, request_options: {}) ⇒ ::Believe::Internal::SkipLimitPage<::Believe::Models::Coaching::CoachingPrinciple>
Get a paginated list of Ted Lasso’s core coaching principles and philosophy.
40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/believe/resources/coaching/principles.rb', line 40 def list(params = {}) parsed, = ::Believe::Coaching::PrincipleListParams.dump_request(params) query = ::Believe::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "coaching/principles", query: query, page: ::Believe::Internal::SkipLimitPage, model: ::Believe::Coaching::CoachingPrinciple, options: ) end |
#retrieve(principle_id, request_options: {}) ⇒ ::Believe::Models::Coaching::CoachingPrinciple
Get details about a specific coaching principle.
18 19 20 21 22 23 24 25 |
# File 'lib/believe/resources/coaching/principles.rb', line 18 def retrieve(principle_id, params = {}) @client.request( method: :get, path: ["coaching/principles/%1$s", principle_id], model: ::Believe::Coaching::CoachingPrinciple, options: params[:request_options] ) end |