The purpose of this library is to porvide a reliable .Net core REST Client for Selligent
- MediumClient
- NotificationGroupClient
- OrganizationClient
- ContentClient
- DataExportClient
- DataImportClient
- JourneyClient
- ABClient
- CustomeClient
- RecurringCliennt
- SingleBatchClient
- TransactionalClient
- TransactionalBulkClient
- TransactionalShortcutClient
- ListClient
- DataClient
- TaskClient
- StatusClient
- StoredProcedureClient
var client = new MediumClient(new SelligentClientConfiguration(){
BaseUrl = "{Paste your api url here e.g. https://yourapi.com/Api/ }",
PublicKey = "{Your API key}",
PrivateKey = "{Your API secret key}",
});
var dataFromApi = await client.GetMediumsAsync();
try
{
var data = new Dictionary<string,string>();
data["MAIL"] = "[email protected]";
data["ABONNEMENT"] = "1";
data["API"] = "1";
data["SOURCE"] ="TEST";
data["CANAL"] = "1";
data["MEDIA"] = "MyMedia";
data["THEME"] = "YourList";
var response = new CustomClient(_config)
.TriggerEntryPointAsync(
"inscription_liste",
"liste_abo",
new Trigger_journey_entry_points_request(data, null),
"ngpa_preprod").Result;
if (response.Result_code == Trigger_journey_entry_point_responseResult_code.Succeeded ||
response.Result_code == Trigger_journey_entry_point_responseResult_code.PartiallySucceeded)
{
return new MemberCreationResult()
{
Success = true
};
} else {
throw new Exception(response.Body);
}
}
catch (Exception e)
{
return new MemberCreationResult()
{
Success = false,
Message = e.Message
};
}
Build the solution and go !