EmailTrigger.GetAllEmailTriggersAsync
Description
Gets the list of all Email Triggers from the connected Control Room
Signature [C#]
Task<List<EmailTrigger>> GetAllEmailTriggersAsync()
Properties
Output
Property | Description |
---|---|
Task<List<EmailTrigger>> | Returns the list of all available email triggers. |
Remarks
Use GetAllEmailTriggersAsync API to list all available email triggers from the connected Control Room.
Example
C#
public void GetAllEmailTriggers()
{
IControlRoomContext context = LoginControlRoom("RegularBuild", "BasicAuth");
var allEmailTriggers = Task.Run(() => context.EmailTriggers.GetAllEmailTriggersAsync()).Result;
foreach (EmailTrigger emailTrigger in allEmailTriggers)
Console.WriteLine("EmailTrigger Name: " + emailTrigger.Name);
}
C#
public IControlRoomContext LoginControlRoom()
{
IControlRoomContext context;
string connectionString;
connectionString = "ServerUrl=https://demo.onnitellibuddies.com;UserName=demoadmin;Password=password";
context = new ControlRoomContext(connectionString);
context.Open();
return context;
}