campaignmonitor / createsend-python

A Python library for the Campaign Monitor API
http://campaignmonitor.github.io/createsend-python
MIT License
57 stars 63 forks source link

add subscriber details #18

Closed tomzaragoza closed 10 years ago

coveralls commented 11 years ago

Coverage Status

Coverage remained the same when pulling afe5c1509ba9ae39021d9c1f60ec28c851dcaee6 on tomzaragoza:createsend-add-subscribers-details into a0fe851f6a83626464475df804138d94f6e6a441 on campaignmonitor:master.

tobio commented 11 years ago

Hey @tomzaragoza,

The wrapper already provides a method to get a subscribers details. I understand that this method is operating on the instance fields which makes sense, but rather than create a new method we'd prefer updating the existing method to use the instance fields if the list_id and email_address arguments aren't supplied.

Something like

  def get(self, list_id=None, email_address=None):
    """Gets a subscriber by list ID and email address."""
    params = { "email": email_address or self.email_address }
    response = self._get("/subscribers/%s.json" % list_id or self.list_id, params=params)
    return json_to_py(response)
tomzaragoza commented 11 years ago

Oh, didn't see that! Shall I update the pull request with your preferred way of updating the method?

tobio commented 11 years ago

All good. Just updating this pull request is fine, any additional commits to your createsend-add-subscribers-details branch should be automatically reflected here.

coveralls commented 11 years ago

Coverage Status

Coverage remained the same when pulling 20b7848edf7347996ed6d4cf00b3adafc7663115 on tomzaragoza:createsend-add-subscribers-details into a0fe851f6a83626464475df804138d94f6e6a441 on campaignmonitor:master.

jdennes commented 11 years ago

Could we get an additional test here please?