Knock.Users (Knock v0.4.14) View Source
Knock resources for accessing users
Link to this section 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.
Link to this section Functions
Specs
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.
Specs
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.
bulk_set_preferences(client, user_ids, preferences, options \\ [])
View SourceSpecs
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.
Specs
delete(Knock.Client.t(), String.t()) :: Knock.Api.response()
Issues a delete request against the user specified
Specs
get(Knock.Client.t(), String.t()) :: Knock.Api.response()
Returns information about the user.
Specs
get_all_preferences(Knock.Client.t(), String.t()) :: Knock.Api.response()
Returns all of the users preference sets
Specs
get_channel_data(Knock.Client.t(), String.t(), String.t()) :: Knock.Api.response()
Returns user's channel data for the given channel id.
Specs
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
Specs
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
Specs
get_preferences(Knock.Client.t(), String.t(), Keyword.t()) :: Knock.Api.response()
Returns the preference set for the user.
Specs
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
Specs
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
Specs
get_user(Knock.Client.t(), String.t()) :: Knock.Api.response()
Returns information about the user from the user_id
given.
Specs
identify(Knock.Client.t(), String.t(), map()) :: Knock.Api.response()
Upserts the user specified via the user_id
with the given properties.
Specs
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
Specs
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
.
set_categories_preferences(client, user_id, categories, options \\ [])
View SourceSpecs
set_categories_preferences(Knock.Client.t(), String.t(), map(), Keyword.t()) :: Knock.Api.response()
Sets the category preferences for the user.
set_category_preferences(client, user_id, category_key, setting, options \\ [])
View SourceSpecs
set_category_preferences( Knock.Client.t(), String.t(), String.t(), map() | boolean(), Keyword.t() ) :: Knock.Api.response()
Sets the category preference for the user.
Specs
set_channel_data(Knock.Client.t(), String.t(), String.t(), map()) :: Knock.Api.response()
Upserts user's channel data for the given channel id.
set_channel_type_preferences(client, user_id, channel_type, setting, options \\ [])
View SourceSpecs
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.
set_channel_types_preferences(client, user_id, channel_types, options \\ [])
View SourceSpecs
set_channel_types_preferences(Knock.Client.t(), String.t(), map(), Keyword.t()) :: Knock.Api.response()
Sets the channel type preferences for the user.
Specs
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.
set_workflow_preferences(client, user_id, workflow_key, setting, options \\ [])
View SourceSpecs
set_workflow_preferences( Knock.Client.t(), String.t(), String.t(), map() | boolean(), Keyword.t() ) :: Knock.Api.response()
Sets the workflow preference for the user.
set_workflows_preferences(client, user_id, workflows, options \\ [])
View SourceSpecs
set_workflows_preferences(Knock.Client.t(), String.t(), map(), Keyword.t()) :: Knock.Api.response()
Sets the workflow preferences for the user.
Specs
unset_channel_data(Knock.Client.t(), String.t(), String.t()) :: Knock.Api.response()
Unsets the user's channel data for the given channel id.