From cfb2c60cb3ac1624fb96f8685bfcc651fbf23ed2 Mon Sep 17 00:00:00 2001 From: Cameron Newman Date: Fri, 21 Apr 2017 11:41:27 +1000 Subject: [PATCH 1/4] New Events Class --- createsend-dotnet/Event.cs | 35 ++++++++++++++++++++++ createsend-dotnet/Models/Event.cs | 24 +++++++++++++++ createsend-dotnet/createsend-dotnet.csproj | 2 ++ 3 files changed, 61 insertions(+) create mode 100644 createsend-dotnet/Event.cs create mode 100644 createsend-dotnet/Models/Event.cs diff --git a/createsend-dotnet/Event.cs b/createsend-dotnet/Event.cs new file mode 100644 index 0000000..623842d --- /dev/null +++ b/createsend-dotnet/Event.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace createsend_dotnet +{ + public class Event : CreateSendBase + { + public string ClientID { get; set; } + + public Event(AuthenticationDetails auth, string clientID) + : base(auth) + { + ClientID = clientID; + } + + public static BasicEventResult Track( + AuthenticationDetails auth, + string clientID, + string eventName, + string emailAddress, + object data) + { + return HttpHelper.Post( + auth, string.Format("/events/{0}/track", clientID), null, + new BasicEvent() + { + EventName = eventName, + ContactID = new ContactID { Email = emailAddress }, + Data = data + }); + } + } +} diff --git a/createsend-dotnet/Models/Event.cs b/createsend-dotnet/Models/Event.cs new file mode 100644 index 0000000..2911813 --- /dev/null +++ b/createsend-dotnet/Models/Event.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace createsend_dotnet +{ + public class ContactID + { + public string Email { get; set; } + } + + public class BasicEvent + { + public ContactID ContactID { get; set; } + public string EventName { get; set; } + public object Data { get; set; } + } + + public class BasicEventResult + { + public string EventID { get; set; } + } +} diff --git a/createsend-dotnet/createsend-dotnet.csproj b/createsend-dotnet/createsend-dotnet.csproj index 3558a36..394c4f5 100644 --- a/createsend-dotnet/createsend-dotnet.csproj +++ b/createsend-dotnet/createsend-dotnet.csproj @@ -55,6 +55,7 @@ + @@ -65,6 +66,7 @@ + From 345e11310bed94cd89d3ed44d7ed547f7e84de11 Mon Sep 17 00:00:00 2001 From: Cameron Newman Date: Mon, 15 May 2017 15:51:31 +1000 Subject: [PATCH 2/4] Updated nuspec version for Events API --- createsend-dotnet.nuspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/createsend-dotnet.nuspec b/createsend-dotnet.nuspec index ddf4774..427c619 100644 --- a/createsend-dotnet.nuspec +++ b/createsend-dotnet.nuspec @@ -3,7 +3,7 @@ campaignmonitor-api Campaign Monitor - 4.2.2 + 5.0.0 Campaign Monitor A .NET library for the Campaign Monitor API with enhancements for Transactional http://opensource.org/licenses/mit-license From 912d9b4e8718401e9ff4bf15d846a4497f3d5f19 Mon Sep 17 00:00:00 2001 From: Cameron Newman Date: Mon, 15 May 2017 15:55:17 +1000 Subject: [PATCH 3/4] Updated AssemblyInfo version for Events API --- createsend-dotnet/Properties/AssemblyInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/createsend-dotnet/Properties/AssemblyInfo.cs b/createsend-dotnet/Properties/AssemblyInfo.cs index 7042abb..c9140dd 100644 --- a/createsend-dotnet/Properties/AssemblyInfo.cs +++ b/createsend-dotnet/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.2.2.0")] -[assembly: AssemblyFileVersion("4.2.2.0")] +[assembly: AssemblyVersion("5.0.0.0")] +[assembly: AssemblyFileVersion("5.0.0.0")] From 9586eadacadf484c44f536bc0c5f7fff2abd34b8 Mon Sep 17 00:00:00 2001 From: Cameron Newman Date: Mon, 15 May 2017 15:56:42 +1000 Subject: [PATCH 4/4] Update HISTORY.md --- HISTORY.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/HISTORY.md b/HISTORY.md index 08c05bd..37b3d62 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,9 @@ # createsend-dotnet history +## v5.0.0 - 16 May, 2017 + +* Events API added to the dotnet 4 wrapper + ## v4.2.2 - 8 Oct, 2015 * Actually upgraded the createsend package set to Nuget