Knock.Users (Knock v0.4.5) 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 information about the user from the user_id given.

Upserts the user specified via the user_id with the given properties.

Merges the user specified with from_user_id into the user specified with user_id.

Upserts user's channel data for the given channel id.

Sets an entire preference set for the user. Will overwrite any existing data.

Sets the workflow preferences for the user.

Unsets the user's channel data for the given channel id.

Link to this section Functions

Link to this function

bulk_delete(client, user_ids)

View Source

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.

Link to this function

bulk_identify(client, users)

View Source

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.

Link to this function

bulk_set_preferences(client, user_ids, preferences, options \\ [])

View Source

Specs

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

Issues a delete request against the user specified

Specs

Returns information about the user.

Link to this function

get_all_preferences(client, user_id)

View Source

Specs

get_all_preferences(Knock.Client.t(), String.t()) :: Knock.Api.response()

Returns all of the users preference sets

Link to this function

get_channel_data(client, user_id, channel_id)

View Source

Specs

get_channel_data(Knock.Client.t(), String.t(), String.t()) ::
  Knock.Api.response()

Returns user's channel data for the given channel id.

Link to this function

get_feed(client, user_id, channel_id, options \\ [])

View Source

Specs

Returns a feed for the user with the given channel_id. Optionally supports all of the options for fetching the feed.

Link to this function

get_messages(client, id, options \\ [])

View Source

Specs

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

Link to this function

get_preferences(client, user_id, options \\ [])

View Source

Specs

get_preferences(Knock.Client.t(), String.t(), Keyword.t()) ::
  Knock.Api.response()

Returns the preference set for the user.

Link to this function

get_user(client, user_id)

View Source
This function is deprecated. Use get/2 instead.

Specs

Returns information about the user from the user_id given.

Link to this function

identify(client, user_id, properties)

View Source

Specs

Upserts the user specified via the user_id with the given properties.

Link to this function

merge(client, user_id, from_user_id)

View Source

Specs

Merges the user specified with from_user_id into the user specified with user_id.

Link to this function

set_categories_preferences(client, user_id, categories, options \\ [])

View Source

Specs

set_categories_preferences(Knock.Client.t(), String.t(), map(), Keyword.t()) ::
  Knock.Api.response()

Sets the category preferences for the user.

Link to this function

set_category_preferences(client, user_id, category_key, setting, options \\ [])

View Source

Specs

set_category_preferences(
  Knock.Client.t(),
  String.t(),
  String.t(),
  map() | boolean(),
  Keyword.t()
) :: Knock.Api.response()

Sets the category preference for the user.

Link to this function

set_channel_data(client, user_id, channel_id, channel_data)

View Source

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.

Link to this function

set_channel_type_preferences(client, user_id, channel_type, setting, options \\ [])

View Source

Specs

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.

Link to this function

set_channel_types_preferences(client, user_id, channel_types, options \\ [])

View Source

Specs

set_channel_types_preferences(Knock.Client.t(), String.t(), map(), Keyword.t()) ::
  Knock.Api.response()

Sets the channel type preferences for the user.

Link to this function

set_preferences(client, user_id, preferences, options \\ [])

View Source

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.

Link to this function

set_workflow_preferences(client, user_id, workflow_key, setting, options \\ [])

View Source

Specs

set_workflow_preferences(
  Knock.Client.t(),
  String.t(),
  String.t(),
  map() | boolean(),
  Keyword.t()
) :: Knock.Api.response()

Sets the workflow preference for the user.

Link to this function

set_workflows_preferences(client, user_id, workflows, options \\ [])

View Source

Specs

set_workflows_preferences(Knock.Client.t(), String.t(), map(), Keyword.t()) ::
  Knock.Api.response()

Sets the workflow preferences for the user.

Link to this function

unset_channel_data(client, user_id, channel_id)

View Source

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.