websdotcom / constant_contact Goto Github PK
View Code? Open in Web Editor NEWThis project forked from nbrew/constant_contact
Activeresource wrapper gem for the Constant Contact API
License: MIT License
This project forked from nbrew/constant_contact
Activeresource wrapper gem for the Constant Contact API
License: MIT License
I am trying to fetched complete list in rails 3.0 and getting below error
NoMethodError (undefined method `collect!' for #<Net::HTTPOK 200 OK readbody=true>):
Below is code
ConstantContact::List.find (:all)
Kindly help me in this regards
rails/rails@51f1f55 will break this library because of the way we override find_every. It's an easy fix, but we need to coordinate with their launch appropriately.
If a List does not contain any contacts the @attributes collection will not contain the ContactCount key. This will cause an exception. The :contact_count method should be hard-coded as an instance method and return 0 if the ContactCount attribute is missing.
Perhaps adding an empty? method for the list would be handy as well.
The gem raises an exception when you try to save an existing contact which has no contact lists (e.g. one that is in the do-not-mail group).
> contact = ConstantContact::Contact.find(1)
=> #<ConstantContact::Contact:0x100000000 @prefix_options={}, @attributes={"Status"=>"Do Not Mail", ...
> contact.contact_lists
=> nil
> contact.save
NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.sort
from .../lib/constant_contact/contact.rb:21:in `to_xml'
...
I'm new to Constant Contact, so perhaps you aren't allowed to update contacts that are in the do-not-mail group, but in that case there should be a more meaningful error. If you are allowed to update these contacts, there should be a way to fix this.
When i try to obtain ContactLists from a Contact which got with ConstantContact::Contact.find_by_email(email) it respond "undefined method 'ContactLists' for ConstantContact::Contact" but when i use this with a Contact recently saved it works successfully
when signing up for the constant contact API, i was given a key_display_name, key, consumer_secret and status.
When you mention user in this gem and password, do you really mean the ones i log in with?
Has their login process changed? Just seems odd getting a secret key and using http authentication really.
Any help would be great.
As of November 2010, the Constant Contact API supports OAuth for authentication (http://community.constantcontact.com/t5/Documentation/Authenticating-Requests-with-OAuth/ba-p/25073).
This library should offer OAuth support, not just Basic. Although, we should keep Basic support for legacy reasons.
The encode_data method should add a carriage return after the last contact. Currently, the contact_strings are joined with a "\n" but the last contact entry needs to have a CR after it (according to the AppConnect examples for using Activity).
Line 36 should look like this:
result += CGI.escape(contact_strings.join("\n") + "\n")
Is it possible to get additional customer data aside from just the email address? I'm specifically interested in the postal address.
I'm trying to create a new contact. Right now, Contact#to_xml puts the user on list 1 by default.
Why is this the default behavior? It's breaking my save request when I try to create a contact, and the account doesn't have a list with ID 1. Is this done because we can't create a new contact without putting it on at least one list?
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.