CampaignFlow.Client.Attachments (CampaignFlow Client v2.0.0)
View SourceAttachment resource operations for the Campaign Flow API.
Attachments represent metadata for files that have been uploaded and attached to entities in the system.
Summary
Functions
Attaches a previously uploaded asset to an entity.
Deletes an attachment.
Retrieves attachment metadata by ID.
Lists attachment metadata.
Functions
@spec create(CampaignFlow.Client.t(), map()) :: CampaignFlow.Client.Request.response()
Attaches a previously uploaded asset to an entity.
Examples
{:ok, attachment} = CampaignFlow.Client.Attachments.create(client, %{
asset_id: 456,
entity_type: "campaign",
entity_id: 789
})
@spec delete(CampaignFlow.Client.t(), integer()) :: CampaignFlow.Client.Request.response()
Deletes an attachment.
Examples
{:ok, response} = CampaignFlow.Client.Attachments.delete(client, 123)
@spec get(CampaignFlow.Client.t(), integer()) :: CampaignFlow.Client.Request.response()
Retrieves attachment metadata by ID.
Examples
{:ok, attachment} = CampaignFlow.Client.Attachments.get(client, 123)
@spec list( CampaignFlow.Client.t(), keyword() ) :: CampaignFlow.Client.Request.response()
Lists attachment metadata.
Options
:page- Page number for pagination:per_page- Number of items per page
Examples
{:ok, attachments} = CampaignFlow.Client.Attachments.list(client)