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, message_id, channel_id:, guide_id:, guide_key:, guide_step_ref:, is_final: nil, tenant: nil, unthrottled: nil, request_options: {}) ⇒ Knockapi::Models::Users::GuideMarkMessageAsArchivedResponse
Some parameter documentations has been truncated, see Models::Users::GuideMarkMessageAsArchivedParams for more details.
-
#mark_message_as_interacted(user_id, message_id, channel_id:, guide_id:, guide_key:, guide_step_ref:, metadata: nil, tenant: nil, request_options: {}) ⇒ Knockapi::Models::Users::GuideMarkMessageAsInteractedResponse
Records that a user has interacted with a guide, triggering any associated interacted events.
-
#mark_message_as_seen(user_id, message_id, channel_id:, content:, guide_id:, guide_key:, guide_step_ref:, data: nil, tenant: nil, request_options: {}) ⇒ Knockapi::Models::Users::GuideMarkMessageAsSeenResponse
Records that a guide has been seen by a user, triggering any associated seen 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.
161 162 163 |
# File 'lib/knockapi/resources/users/guides.rb', line 161 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, message_id, channel_id:, guide_id:, guide_key:, guide_step_ref:, is_final: nil, tenant: nil, unthrottled: nil, request_options: {}) ⇒ Knockapi::Models::Users::GuideMarkMessageAsArchivedResponse
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.
71 72 73 74 75 76 77 78 79 80 |
# File 'lib/knockapi/resources/users/guides.rb', line 71 def (user_id, , params) parsed, = Knockapi::Users::GuideMarkMessageAsArchivedParams.dump_request(params) @client.request( method: :put, path: ["v1/users/%1$s/guides/messages/%2$s/archived", user_id, ], body: parsed, model: Knockapi::Models::Users::GuideMarkMessageAsArchivedResponse, options: ) end |
#mark_message_as_interacted(user_id, message_id, channel_id:, guide_id:, guide_key:, guide_step_ref:, metadata: nil, tenant: nil, request_options: {}) ⇒ Knockapi::Models::Users::GuideMarkMessageAsInteractedResponse
Records that a user has interacted with a guide, triggering any associated interacted events.
108 109 110 111 112 113 114 115 116 117 |
# File 'lib/knockapi/resources/users/guides.rb', line 108 def (user_id, , params) parsed, = Knockapi::Users::GuideMarkMessageAsInteractedParams.dump_request(params) @client.request( method: :put, path: ["v1/users/%1$s/guides/messages/%2$s/interacted", user_id, ], body: parsed, model: Knockapi::Models::Users::GuideMarkMessageAsInteractedResponse, options: ) end |
#mark_message_as_seen(user_id, message_id, channel_id:, content:, guide_id:, guide_key:, guide_step_ref:, data: nil, tenant: nil, request_options: {}) ⇒ Knockapi::Models::Users::GuideMarkMessageAsSeenResponse
Records that a guide has been seen by a user, triggering any associated seen events.
147 148 149 150 151 152 153 154 155 156 |
# File 'lib/knockapi/resources/users/guides.rb', line 147 def (user_id, , params) parsed, = Knockapi::Users::GuideMarkMessageAsSeenParams.dump_request(params) @client.request( method: :put, path: ["v1/users/%1$s/guides/messages/%2$s/seen", user_id, ], body: parsed, model: Knockapi::Models::Users::GuideMarkMessageAsSeenResponse, options: ) end |