Skip to content

C# client library implementing all Flowmailer API methods

Notifications You must be signed in to change notification settings

RonSijm/RonSijm.Flowmailer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RonSijm.Flowmailer

.NET Nuget codecov

C# client library implementing all Flowmailer API methods

API documentation: https://flowmailer.com/apidoc/flowmailer-api

Nuget: https://www.nuget.org/packages/RonSijm.Flowmailer/

Usage in library:

var client = new FlowMailerClient(httpFactory, "ClientId", "ClientSecret", "AccountId");
var result = await client.GetEventFlows();

Usage in ASP Core:

Create a config session in your appsettings.json:

"FlowMailer": {
  "ClientId": "ClientId",
  "ClientSecret": "ClientSecret",
  "AccountId": "1337"
}

Wire it up in your Program.cs:

var flowMailerConfig = builder.Configuration.GetSection("FlowMailer").Get<FlowMailerOptions>();
builder.Services.AddScoped<IFlowMailerClient>(serviceProvider => new FlowMailerClient(serviceProvider.GetService<IHttpClientFactory>(), flowMailerConfig));

Implemented methods:

GetEventFlowRules


GetHierarchyFlowEventFlowRules


ListEventFlows


CreateEventFlows


DeleteEventByEventFlowId


GetEventByEventFlowId


SaveEventByEventFlowId


GetRuleForAEventByEventFlowId


SetRuleForAEventByEventFlowId


ListFilters

  • List filters per account
  • Url: https://api.flowmailer.net/{account_id}/filters
  • Endpoint: Task<List> ListFilters(ref_range range, date_range daterange = default, string sortorder = default, CancellationToken cancellationToken = default)

DeleteFilter


GetFlowRules


ListFlowTemplates


ListFlows


CreateFlow


DeleteFlow


GetFlow


SaveFlow


ListMessagesPerFlow

  • List messages per flow
  • Url: https://api.flowmailer.net/{account_id}/flows/{flowId}/messages
  • Endpoint: Task<List> ListMessagesPerFlow(date_range daterange, string flowId, items_range range, bool addheaders = default, bool addonlinelink = default, bool addtags = default, CancellationToken cancellationToken = default)

GetRuleForAFlowConditions


SetRuleForAFlow


GetStatisticsForAFlow


ListMessageEvents

  • List message events
  • Url: https://api.flowmailer.net/{account_id}/message_events
  • Endpoint: Task<List> ListMessageEvents(ref_range range, bool addmessagetags = default, date_range daterange = default, List flowIds = default, date_range receivedrange = default, string sortorder = default, List sourceIds = default, CancellationToken cancellationToken = default)

ListMessageHold


GetMessageHold


ListMessages

  • List messages
  • Url: https://api.flowmailer.net/{account_id}/messages
  • Endpoint: Task<List> ListMessages(ref_range range, bool addevents = default, bool addheaders = default, bool addonlinelink = default, bool addtags = default, date_range daterange = default, List flowIds = default, string sortfield = default, string sortorder = default, CancellationToken cancellationToken = default)

SimulateMessage


SubmitMessage


GetMessage


ListArchivedAsMessage


FetchAttachmentForAnArchivedMessageByFlowStepIdAndContentId


GetErrorArchiveByMessages


ResendMessage


GetMessageStats


GetRecipient


ListMessagesPerRecipient

  • List messages per recipient
  • Url: https://api.flowmailer.net/{account_id}/recipient/{recipient}/messages
  • Endpoint: Task<List> ListMessagesPerRecipient(ref_range range, string recipient, bool addheaders = default, bool addonlinelink = default, bool addtags = default, date_range daterange = default, string sortorder = default, CancellationToken cancellationToken = default)

ListMessagesPerSender

  • List messages per sender
  • Url: https://api.flowmailer.net/{account_id}/sender/{sender}/messages
  • Endpoint: Task<List> ListMessagesPerSender(ref_range range, string sender, bool addheaders = default, bool addonlinelink = default, bool addtags = default, date_range daterange = default, string sortorder = default, CancellationToken cancellationToken = default)

ListSenderDomains


CreateSenderDomains


GetByBySenderDomains


ValidatesSenderDomains


DeleteSenderDomains


GetSenderDomains


SaveSenderDomains


ListSenderIdentities


CreateSenderIdentities


DeleteSenderIdentitiesByIdentityId


GetSenderIdentitiesByIdentityId


SaveSenderIdentitiesByIdentityId


ListSourceSystems


PostSources


DeleteSources


GetSource


UpdateSources


ListMessagesPerSource


GetStatisticsForASource


ListUsersPerSourceSystem


PostUsersBySources


DeleteUsersBySources


GetUsersBySources


UpdateUsersBySources


ListMessagesPerTag

  • List messages per tag
  • Url: https://api.flowmailer.net/{account_id}/tag/{tag}/messages
  • Endpoint: Task<List> ListMessagesPerTag(ref_range range, string tag, bool addheaders = default, bool addonlinelink = default, bool addtags = default, date_range daterange = default, string sortorder = default, CancellationToken cancellationToken = default)

ListTemplates