I'm attempting to use the Constant Contact gem (here https://github.com/constantcontact/ruby-sdk ) to add a contact. However, I can't find anything that tells me how to go about doing this. I've tried looking through the gem itself, and attempting various methods to no avail. I have the gem setup in my app, I have an API key, and I can successfully get a list of contacts, but that functionality is completely useless to me. When I try to use the same object with the add_contact method (i.e. cc.add_contact(token, @contact, true)), I get a 400 Bad Request error. Is there anything posted anywhere that details simply how to add a contact? Such information would be greatly appreciated!
Thanks for posting. Have you had a look at the example? Inside the SDK is a small ruby app that makes a PUT or POST of a contact to a selected list. It's located here:
The methods I'm referring to are in myapp.rb on lines 145 and 147. I'm not sure if the gem had a method with three arguments for the add, the one in the example has only two. I hope this helps.
Thanks for the reply. I've been trying to use the same method as the one in the code posted. When I was looking at the code in the gem, the third parameter in the method is optional. It's for initiated by user, but in any case, I get the same result with and without the third parameter. This is what I'm trying: https://gist.github.com/willc0de4food/cdf0668e78c8777a3787
View API documentation, code samples, get your API key.Visit Page
We want to hear from customers like you about your favorite features and how they have helped your business or organization. Tell us by answering a few questions in...Read More