Knock.Users (Knock v0.4.18)
View SourceKnock resources for accessing users
Summary
Functions
Bulk deletes the list of users given. Can accept a maximum of 100 users at a time.
Bulk identifies the list of users given. Can accept a maximum of 100 users at a time.
Bulk sets the preferences given for the list of user ids. Will overwrite the any existing preferences for these users.
Issues a delete request against the user specified
Returns information about the user.
Returns all of the users preference sets
Returns user's channel data for the given channel id.
Returns a feed for the user with the given channel_id. Optionally supports all of the options for fetching the feed.
Returns paginated messages for the given user
Returns the preference set for the user.
Returns paginated schedules for the given user
Returns paginated subscriptions for the given user
Returns information about the user from the user_id
given.
Upserts the user specified via the user_id
with the given properties.
Returns paginated list of users
Merges the user specified with from_user_id
into the user specified with user_id
.
Sets the category preferences for the user.
Sets the category preference for the user.
Upserts user's channel data for the given channel id.
Sets the channel type preference for the user.
Sets the channel type preferences for the user.
Sets an entire preference set for the user. Will overwrite any existing data.
Sets the workflow preference for the user.
Sets the workflow preferences for the user.
Unsets the user's channel data for the given channel id.
Functions
@spec bulk_delete(Knock.Client.t(), [String.t()]) :: Knock.Api.response()
Bulk deletes the list of users given. Can accept a maximum of 100 users at a time.
@spec bulk_identify(Knock.Client.t(), [map()]) :: Knock.Api.response()
Bulk identifies the list of users given. Can accept a maximum of 100 users at a time.
@spec bulk_set_preferences(Knock.Client.t(), [String.t()], map(), Keyword.t()) :: Knock.Api.response()
Bulk sets the preferences given for the list of user ids. Will overwrite the any existing preferences for these users.
@spec delete(Knock.Client.t(), String.t()) :: Knock.Api.response()
Issues a delete request against the user specified
@spec get(Knock.Client.t(), String.t()) :: Knock.Api.response()
Returns information about the user.
@spec get_all_preferences(Knock.Client.t(), String.t()) :: Knock.Api.response()
Returns all of the users preference sets
@spec get_channel_data(Knock.Client.t(), String.t(), String.t()) :: Knock.Api.response()
Returns user's channel data for the given channel id.
@spec get_feed(Knock.Client.t(), String.t(), String.t(), Keyword.t()) :: Knock.Api.response()
Returns a feed for the user with the given channel_id. Optionally supports all of the options for fetching the feed.
Available optional parameters:
#
- page_size: specify size of the page to be returned by the api. (max limit: 50)
- after: after cursor for pagination
- before: before cursor for pagination
- status: list of statuses to filter feed items with
- tenant: tenant_id to filter messages with
- has_tenant: optionally scope items by a tenant id or no tenant
- archived: scope items by a given archived status (defaults to "exclude")
- trigger_data: trigger payload to filter feed items with
@spec get_messages(Knock.Client.t(), String.t(), Keyword.t()) :: Knock.Api.response()
Returns paginated messages for the given user
Available optional parameters:
#
- page_size: specify size of the page to be returned by the api. (max limit: 50)
- after: after cursor for pagination
- before: before cursor for pagination
- status: list of statuses to filter messages with
- tenant: tenant_id to filter messages with
- channel_id: channel_id to filter messages with
- source: workflow key to filter messages with
- trigger_data: trigger payload to filter messages with
@spec get_preferences(Knock.Client.t(), String.t(), Keyword.t()) :: Knock.Api.response()
Returns the preference set for the user.
@spec get_schedules(Knock.Client.t(), String.t(), Keyword.t()) :: Knock.Api.response()
Returns paginated schedules for the given user
Available optional parameters:
#
- page_size: specify size of the page to be returned by the api. (max limit: 50)
- after: after cursor for pagination
- before: before cursor for pagination
- tenant: tenant_id to filter messages with
- workflow: workflow key to filter messages with
@spec get_subscriptions(Knock.Client.t(), String.t(), Keyword.t()) :: Knock.Api.response()
Returns paginated subscriptions for the given user
Available optional parameters:
#
- page_size: specify size of the page to be returned by the api. (max limit: 50)
- after: after cursor for pagination
- before: before cursor for pagination
@spec get_user(Knock.Client.t(), String.t()) :: Knock.Api.response()
Returns information about the user from the user_id
given.
@spec identify(Knock.Client.t(), String.t(), map()) :: Knock.Api.response()
Upserts the user specified via the user_id
with the given properties.
@spec list(Knock.Client.t(), Keyword.t()) :: Knock.Api.response()
Returns paginated list of users
Available optional parameters:
#
- page_size: specify size of the page to be returned by the api. (max limit: 50)
- after: after cursor for pagination
- before: before cursor for pagination
@spec merge(Knock.Client.t(), String.t(), String.t()) :: Knock.Api.response()
Merges the user specified with from_user_id
into the user specified with user_id
.
@spec set_categories_preferences(Knock.Client.t(), String.t(), map(), Keyword.t()) :: Knock.Api.response()
Sets the category preferences for the user.
@spec set_category_preferences( Knock.Client.t(), String.t(), String.t(), map() | boolean(), Keyword.t() ) :: Knock.Api.response()
Sets the category preference for the user.
@spec set_channel_data(Knock.Client.t(), String.t(), String.t(), map()) :: Knock.Api.response()
Upserts user's channel data for the given channel id.
@spec set_channel_type_preferences( Knock.Client.t(), String.t(), String.t(), boolean(), Keyword.t() ) :: Knock.Api.response()
Sets the channel type preference for the user.
@spec set_channel_types_preferences(Knock.Client.t(), String.t(), map(), Keyword.t()) :: Knock.Api.response()
Sets the channel type preferences for the user.
@spec set_preferences(Knock.Client.t(), String.t(), map(), Keyword.t()) :: Knock.Api.response()
Sets an entire preference set for the user. Will overwrite any existing data.
@spec set_workflow_preferences( Knock.Client.t(), String.t(), String.t(), map() | boolean(), Keyword.t() ) :: Knock.Api.response()
Sets the workflow preference for the user.
@spec set_workflows_preferences(Knock.Client.t(), String.t(), map(), Keyword.t()) :: Knock.Api.response()
Sets the workflow preferences for the user.
@spec unset_channel_data(Knock.Client.t(), String.t(), String.t()) :: Knock.Api.response()
Unsets the user's channel data for the given channel id.