Class: Knockapi::Resources::Users::Guides
- Inherits:
-
Object
- Object
- Knockapi::Resources::Users::Guides
- Defined in:
- lib/knockapi/resources/users/guides.rb,
sig/knockapi/resources/users/guides.rbs
Overview
A user is an individual from your system, represented in Knock. They are most commonly a recipient of a notification.
Instance Method Summary collapse
-
#get_channel(user_id, channel_id, data: nil, tenant: nil, type: nil, request_options: {}) ⇒ Knockapi::Models::Users::GuideGetChannelResponse
Returns a list of eligible in-app guides for a specific user and channel.
-
#initialize(client:) ⇒ Guides
constructor
private
A new instance of Guides.
-
#mark_message_as_archived(user_id, channel_id:, guide_id:, guide_key:, guide_step_ref:, is_final: nil, tenant: nil, unthrottled: nil, request_options: {}) ⇒ Knockapi::Models::Users::GuideActionResponse
Some parameter documentations has been truncated, see Models::Users::GuideMarkMessageAsArchivedParams for more details.
-
#mark_message_as_interacted(user_id, channel_id:, guide_id:, guide_key:, guide_step_ref:, metadata: nil, tenant: nil, request_options: {}) ⇒ Knockapi::Models::Users::GuideActionResponse
Records that a user has interacted with a guide, triggering any associated interacted events.
-
#mark_message_as_seen(user_id, channel_id:, content:, guide_id:, guide_key:, guide_step_ref:, data: nil, tenant: nil, request_options: {}) ⇒ Knockapi::Models::Users::GuideActionResponse
Records that a guide has been seen by a user, triggering any associated seen events.
-
#reset_guide_engagements(user_id, guide_key:, tenant: nil, request_options: {}) ⇒ Knockapi::Models::Users::GuideActionResponse
Resets the engagement state of a guide for a user, removing the guide's engagement log entry so the next interaction creates a fresh engagement.
-
#unarchive_guide_message(user_id, guide_key:, tenant: nil, request_options: {}) ⇒ Knockapi::Models::Users::GuideActionResponse
Records that a guide has been unarchived, triggering any associated unarchived events.
Constructor Details
#initialize(client:) ⇒ Guides
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 Guides.
209 210 211 |
# File 'lib/knockapi/resources/users/guides.rb', line 209 def initialize(client:) @client = client end |
Instance Method Details
#get_channel(user_id, channel_id, data: nil, tenant: nil, type: nil, request_options: {}) ⇒ Knockapi::Models::Users::GuideGetChannelResponse
Returns a list of eligible in-app guides for a specific user and channel.
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/knockapi/resources/users/guides.rb', line 28 def get_channel(user_id, channel_id, params = {}) parsed, = Knockapi::Users::GuideGetChannelParams.dump_request(params) query = Knockapi::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["v1/users/%1$s/guides/%2$s", user_id, channel_id], query: query, model: Knockapi::Models::Users::GuideGetChannelResponse, options: ) end |
#mark_message_as_archived(user_id, channel_id:, guide_id:, guide_key:, guide_step_ref:, is_final: nil, tenant: nil, unthrottled: nil, request_options: {}) ⇒ Knockapi::Models::Users::GuideActionResponse
Some parameter documentations has been truncated, see Models::Users::GuideMarkMessageAsArchivedParams for more details.
Records that a guide has been archived by a user, triggering any associated archived events.
69 70 71 72 73 74 75 76 77 78 |
# File 'lib/knockapi/resources/users/guides.rb', line 69 def (user_id, params) parsed, = Knockapi::Users::GuideMarkMessageAsArchivedParams.dump_request(params) @client.request( method: :put, path: ["v1/users/%1$s/guides/messages/archived", user_id], body: parsed, model: Knockapi::Users::GuideActionResponse, options: ) end |
#mark_message_as_interacted(user_id, channel_id:, guide_id:, guide_key:, guide_step_ref:, metadata: nil, tenant: nil, request_options: {}) ⇒ Knockapi::Models::Users::GuideActionResponse
Records that a user has interacted with a guide, triggering any associated interacted events.
104 105 106 107 108 109 110 111 112 113 |
# File 'lib/knockapi/resources/users/guides.rb', line 104 def (user_id, params) parsed, = Knockapi::Users::GuideMarkMessageAsInteractedParams.dump_request(params) @client.request( method: :put, path: ["v1/users/%1$s/guides/messages/interacted", user_id], body: parsed, model: Knockapi::Users::GuideActionResponse, options: ) end |
#mark_message_as_seen(user_id, channel_id:, content:, guide_id:, guide_key:, guide_step_ref:, data: nil, tenant: nil, request_options: {}) ⇒ Knockapi::Models::Users::GuideActionResponse
Records that a guide has been seen by a user, triggering any associated seen events.
141 142 143 144 145 146 147 148 149 150 |
# File 'lib/knockapi/resources/users/guides.rb', line 141 def (user_id, params) parsed, = Knockapi::Users::GuideMarkMessageAsSeenParams.dump_request(params) @client.request( method: :put, path: ["v1/users/%1$s/guides/messages/seen", user_id], body: parsed, model: Knockapi::Users::GuideActionResponse, options: ) end |
#reset_guide_engagements(user_id, guide_key:, tenant: nil, request_options: {}) ⇒ Knockapi::Models::Users::GuideActionResponse
Resets the engagement state of a guide for a user, removing the guide's engagement log entry so the next interaction creates a fresh engagement.
168 169 170 171 172 173 174 175 176 177 |
# File 'lib/knockapi/resources/users/guides.rb', line 168 def reset_guide_engagements(user_id, params) parsed, = Knockapi::Users::GuideResetGuideEngagementsParams.dump_request(params) @client.request( method: :put, path: ["v1/users/%1$s/guides/engagements/reset", user_id], body: parsed, model: Knockapi::Users::GuideActionResponse, options: ) end |
#unarchive_guide_message(user_id, guide_key:, tenant: nil, request_options: {}) ⇒ Knockapi::Models::Users::GuideActionResponse
Records that a guide has been unarchived, triggering any associated unarchived events.
195 196 197 198 199 200 201 202 203 204 |
# File 'lib/knockapi/resources/users/guides.rb', line 195 def (user_id, params) parsed, = Knockapi::Users::GuideUnarchiveGuideMessageParams.dump_request(params) @client.request( method: :delete, path: ["v1/users/%1$s/guides/messages/archived", user_id], body: parsed, model: Knockapi::Users::GuideActionResponse, options: ) end |