constantcontact / .net-sdk Goto Github PK
View Code? Open in Web Editor NEWConstant Contact .NET SDK for v2 API
License: Other
Constant Contact .NET SDK for v2 API
License: Other
Doesn't look like any changes since 2015. Your competitors, such as Send Grid are maintaining their SDK's in awesome fashion. Why not constant contact?
The REST API provides access to click through details on an Email Campaign via an array named click_through_details.
https://api.constantcontact.com/v2/emailmarketing/campaigns
see here:
http://developer.constantcontact.com/docs/email-campaigns/email-campaigns-collection.html
The EmailCampaign class in the .NET SDK does not contain the property that represents this information.
Any chance this is getting updated to support TLS 1.2?
The problem faced is that whatever item is added to an IList
of type AddContactsImportData
it will overwrite all of the other records.
In the following code, the last contactList
item in the for-loop overwrites the first item i.e. index 1 overwrites the data at index 0 and adds the new data at index 1. All contactList
items of type AddContactsImportData
are overwritten by the contactList
item that is added last.
AddContactsImportData contact = new AddContactsImportData();
IList<string> email_addresses = new List<string>();
IList<AddContactsImportData> contactList = new List<AddContactsImportData>();
for (int i = 0; i < 2; i++)
{
contact.EmailAddresses.Clear();
contact.EmailAddresses.Add("Email" + i.ToString());
contact.FirstName = "FirstName" + i.ToString();
contact.LastName = "LastName" + i.ToString();
contactList.Add(contact);
}
string json = Newtonsoft.Json.JsonConvert.SerializeObject(contactList);
lbTest.Text = lbTest.Text + "<br />" + json; // ASP:Label
This code yields the following JSON:
[{"email_addresses":["Email1"],"addresses":[],"custom_fields":[],"first_name":"FirstName1","middle_name":null,"last_name":"LastName1","job_title":null,"company_name":null,"work_phone":null,"home_phone":null,"birthday_day":null,"birthday_month":null,"anniversary":null},
{"email_addresses":["Email1"],"addresses":[],"custom_fields":[],"first_name":"FirstName1","middle_name":null,"last_name":"LastName1","job_title":null,"company_name":null,"work_phone":null,"home_phone":null,"birthday_day":null,"birthday_month":null,"anniversary":null}]
I was expecting the first row to contain Email0
, FirstName0
and LastName0
.
It would be nice if an async methods available, since we are going over a network that might have some lag, and then to your servers, which might hold up resources waiting on network, or even your own servers if you have a high traffic time.
On this page it allows me to create items via POST. For instance, I can create a Contact List, Email Campaign, or Add a new contact to a list.
How do I do that with this API?
I've added a question on stackoverflow.
Hi,
I see that there is a nuget folder on the repository but couldn't find the nuget package on the official repository.
Is there any reason that this package was not published yet ?
If you want, I can published it and put the credentials used to published it on github ?
By the way, thanks guys for this project. It allowed us to easily plug our application with constant contact.
Thanks,
Unable to cast object of type 'CTCT.Services.CampaignScheduleService' to type 'CTCT.Services.IEmailCampaignService'.
A developer brought up the issue in this community post:
https://community.constantcontact.com/t5/Developer-Support-ask-questions/ArchiveURL-missing-from-Campaign-details-in-API-v2/m-p/229439#M9145
They always return null, but it's raising questions with developers, causing confusion, hesitation.
We have by design removed support for email campaign archive_url and archive_status in AppConnect, but the functions still exist.
Hi,
I'm currently working on a project where I have integrated a newsletter subscription system with your SDK.
All I need is inside, so it's great ! :)
However, when I want to add a new contact to a list, a WebException is thrown in my code with status "Created Created" as you can seen below in the screenshot.
Indeed, we can see that StatusCode is not equals to HttpStatus.OK.
Have you ever encountered this problem? Moreover, this issue occurs when I delete a contact from a list, the status in this case is "No content, No content"...
Thank's :)
Damdirt
A developer brought up the issue in this community post:
https://community.constantcontact.com/t5/Developer-Support-ask-questions/NET-SDK-doesn-t-implement-limit-or-pagination-for-Event/m-p/260746#M9493
Method will always return up to 50 results, but cannot be paginated or have any limit set other than the default of 50.
See:
https://github.com/constantcontact/.net-sdk/blob/master/CTCTWrapper/Services/EventSpotService.cs
So I'm pretty sure i've uncovered a larger issue with the SDK that should be looked into. That is, when the SDK created its URLS to pass though to the API, it does not URL encode critical parameters. In my case, its the email address on calls to GetContacts(string email, ...)
It is VERY common these days for emails to have the "+" symbol ever since gmail has supported the "myemail+[anything]@gmail.com" as a way to set up inbox rules...
When you fix this bug, i'd consider sweeping the code for all cases where you generate urls from userdata and make sure they get url encoded.
Pardon my ignorance, but how do I "Add the CTCT.dll library to your references project."?
When I make a call to GetEmailCampaignActivites
, it seems that the JSON response is of a different form than expected.
In ContactTrackingServices.cs
when I change the return type from ResultSet<TrackingSummary>
to IList<TrackingSummary>
it works.
I'm having a similar problem with GetActivities
. When I look at ContactActivity.cs
it seems to expect a very different response than the one provided by v2 of the API.
For example, campaign_id
, activity_type
, contact_id
, and email_address
are completely missing from ContactActivity.cs.
Response from contact tracking report
{
"meta": {
"pagination": {}
},
"results": [{
"activity_type": "EMAIL_BOUNCE",
"campaign_id": "11217797",
"contact_id": "1017",
"email_address": "[email protected]",
"bounce_code": "S",
"bounce_description": "Suspended",
"bounce_message": "",
"bounce_date": "2015-07-21T23:05:00.000Z"
}, {
"activity_type": "EMAIL_SEND",
"campaign_id": "112187797",
"contact_id": "102017",
"send_date": "2015-07-21T23:05:00.000Z"
}, {
"activity_type": "EMAIL_BOUNCE",
"campaign_id": "115774954",
"contact_id": "10217",
"email_address": "[email protected]",
"bounce_code": "S",
"bounce_description": "Suspended",
"bounce_message": "",
"bounce_date": "2015-07-21T11:50:00.000Z"
}, {
"activity_type": "EMAIL_SEND",
"campaign_id": "11217954",
"contact_id": "104017",
"send_date": "2015-07-21T11:50:00.000Z"
}]
}
On the bulk activity page for removing contacts the data contract is using IList
in the SDK the method signature has Ilist. when using this method i cannot remove more than one contact email address.
Activity AddRemoveContactsFromListsActivity(string accessToken, string apiKey, IList emailAddresses, IList lists);
does this need to be
Activity AddRemoveContactsFromListsActivity(string accessToken, string apiKey, IList emailAddresses, IList lists);
The documentation says...
In order to use the Constant Contact SDK you have to follow these steps:
Where do I find this dll ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.