CampaignFlow.Client.Assets (CampaignFlow Client v2.0.0)

View Source

Asset resource operations for the Campaign Flow API.

Assets represent files that have been uploaded to the system.

Summary

Functions

Uploads an asset and optionally attaches it to an entity.

Retrieves a previously uploaded asset.

Functions

create(client, params)

Uploads an asset and optionally attaches it to an entity.

Examples

{:ok, asset} = CampaignFlow.Client.Assets.create(client, %{
  file: file_data,
  entity_type: "campaign",
  entity_id: 123
})

get(client, id, hash)

Retrieves a previously uploaded asset.

Examples

{:ok, asset} = CampaignFlow.Client.Assets.get(client, 123, "abc123hash")