~barry/mailman/work1

« back to all changes in this revision

Viewing changes to src/mailman/interfaces/subscriptions.py

  • Committer: Barry Warsaw
  • Date: 2012-09-05 02:38:07 UTC
  • mfrom: (7167.1.3 bug-1024509)
  • Revision ID: barry@list.org-20120905023807-t3jb9q75m53sg93i
LP: #1024509 - Schema migration; link between members and mailing lists should
use List-ID.

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
        :rtype: `IMember`
70
70
        """
71
71
 
72
 
    def find_members(subscriber=None, fqdn_listname=None, role=None):
 
72
    def find_members(subscriber=None, list_id=None, role=None):
73
73
        """Search for and return a specific member.
74
74
 
75
75
        The members are sorted first by fully-qualified mailing list name,
80
80
        :param subscriber: The email address or user id of the user getting
81
81
            subscribed.
82
82
        :type subscriber: string or int
83
 
        :param fqdn_listname: The posting address of the mailing list to
84
 
            search for the subscriber's memberships on.
85
 
        :type fqdn_listname: string
 
83
        :param list_id: The list id of the mailing list to search for the
 
84
            subscriber's memberships on.
 
85
        :type list_id: string
86
86
        :param role: The member role.
87
87
        :type role: `MemberRole`
88
88
        :return: The list of all memberships, which may be empty.
92
92
    def __iter__():
93
93
        """See `get_members()`."""
94
94
 
95
 
    def join(fqdn_listname, subscriber, display_name=None,
96
 
             delivery_mode=DeliveryMode.regular, 
 
95
    def join(list_id, subscriber, display_name=None,
 
96
             delivery_mode=DeliveryMode.regular,
97
97
             role=MemberRole.member):
98
98
        """Subscribe to a mailing list.
99
99
 
103
103
        the subscription request is still dependent on the policy of the
104
104
        mailing list.
105
105
 
106
 
        :param fqdn_listname: The posting address of the mailing list to
107
 
            subscribe the user to.
108
 
        :type fqdn_listname: string
 
106
        :param list_id: The list id of the mailing list the user is
 
107
            subscribing to.
 
108
        :type list_id: string
109
109
        :param subscriber: The email address or user id of the user getting
110
110
            subscribed.
111
111
        :type subscriber: string or int
130
130
        :raises ValueError: when `delivery_mode` is invalid.
131
131
        """
132
132
 
133
 
    def leave(fqdn_listname, email):
 
133
    def leave(list_id, email):
134
134
        """Unsubscribe from a mailing list.
135
135
 
136
 
        :param fqdn_listname: The posting address of the mailing list to
137
 
            unsubscribe the user from.
138
 
        :type fqdn_listname: string
 
136
        :param list_id: The list id of the mailing list the user is
 
137
            unsubscribing from.
 
138
        :type list_id: string
139
139
        :param email: The email address of the user getting unsubscribed.
140
140
        :type email: string
141
141
        :raises InvalidEmailAddressError: if the email address is not valid.