Knock.Objects (Knock v0.4.0) View Source

Knock resources for accessing Objects

Link to this section Summary

Types

An object reference is how we refer to a particular object in a collection

Functions

Builds an object reference, which can be used in workflow trigger calls.

Bulk deletes one or more objects in a collection.

Bulk upserts one or more objects in a collection.

Deletes the given object.

Gets the given object.

Returns channel data for the given channel id.

Upserts the given object in the collection with the attrs provided.

Upserts channel data for the given channel id.

Link to this section Types

Specs

ref() :: %{id: :string, collection: :string}

An object reference is how we refer to a particular object in a collection

Link to this section Functions

Link to this function

build_ref(collection, id)

View Source

Specs

build_ref(String.t(), String.t()) :: ref()

Builds an object reference, which can be used in workflow trigger calls.

Link to this function

bulk_delete(client, collection, object_ids)

View Source

Specs

bulk_delete(Knock.Client.t(), String.t(), [String.t()]) :: Knock.Api.response()

Bulk deletes one or more objects in a collection.

Link to this function

bulk_set(client, collection, objects)

View Source

Specs

bulk_set(Knock.Client.t(), String.t(), [map()]) :: Knock.Api.response()

Bulk upserts one or more objects in a collection.

Link to this function

delete(client, collection, id)

View Source

Specs

Deletes the given object.

Link to this function

get(client, collection, id)

View Source

Specs

Gets the given object.

Link to this function

get_channel_data(client, collection, id, channel_id)

View Source

Specs

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

Returns channel data for the given channel id.

Link to this function

set(client, collection, id, attrs)

View Source

Specs

Upserts the given object in the collection with the attrs provided.

Link to this function

set_channel_data(client, collection, id, channel_id, channel_data)

View Source

Specs

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

Upserts channel data for the given channel id.