------------------------------------------------------------
revno: 53
committer: Florian Fuchs <[email protected]>
branch nick: mailman.client
timestamp: Wed 2014-04-16 14:42:04 -0400
message:
added client.get_member shortcut to retrieve a specific member of a list
modified:
src/mailmanclient/_client.py
src/mailmanclient/docs/using.txt
--
lp:mailman.client
https://code.launchpad.net/~mailman-coders/mailman.client/trunk
Your team Mailman Coders is subscribed to branch lp:mailman.client.
To unsubscribe from this branch go to
https://code.launchpad.net/~mailman-coders/mailman.client/trunk/+edit-subscription
=== modified file 'src/mailmanclient/_client.py'
--- src/mailmanclient/_client.py 2014-04-14 22:03:43 +0000
+++ src/mailmanclient/_client.py 2014-04-16 18:42:04 +0000
@@ -178,6 +178,9 @@
return [_Member(self._connection, entry['self_link'])
for entry in content['entries']]
+ def get_member(self, fqdn_listname, subscriber_address):
+ return self.get_list(fqdn_listname).get_member(subscriber_address)
+
def get_member_page(self, count=50, page=1):
return _Page(self._connection, 'members', _Member, count, page)
=== modified file 'src/mailmanclient/docs/using.txt'
--- src/mailmanclient/docs/using.txt 2014-04-14 22:03:43 +0000
+++ src/mailmanclient/docs/using.txt 2014-04-16 18:42:04 +0000
@@ -269,6 +269,11 @@
>>> print cris_test_two.role
member
+A membership can also be retrieved without instantiating the list object first:
+
+ >>> client.get_member('[email protected]', '[email protected]')
+ <Member "[email protected]" on "test-two.example.com">
+
A membership has preferences.
>>> prefs = cris_test_two.preferences
_______________________________________________
Mailman-coders mailing list
[email protected]
https://mail.python.org/mailman/listinfo/mailman-coders