websdotcom / constant_contact

Activeresource wrapper gem for the Constant Contact API
MIT License
23 stars 22 forks source link

undefined method 'ContactLists' for ConstantContact::Contact #9

Open brayancastrop opened 13 years ago

brayancastrop commented 13 years ago

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

boone commented 13 years ago

The example at the bottom of the README notes that lookups by email don't return a complete Contact:

c = ConstantContact::Contact.find_by_email('jon@example.com')
@contact = ConstantContact::Contact.find(c.int_id) # Because Constant Contact doesn't return a full contact when searching by email

It would be nice to see the object automatically make the second find call if the data is not yet defined.

eldavido commented 13 years ago

The two calls have different use cases. This could be documented better, but I don't think the code should be changed.