~raj-abhilash1/mailman/bugfix

« back to all changes in this revision

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

  • Committer: Barry Warsaw
  • Date: 2015-04-17 18:20:02 UTC
  • mfrom: (7323.1.5 requests)
  • Revision ID: barry@list.org-20150417182002-2cwa86n7k9fsxuj8
Plumb subscription request handling through the REST API.

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
 
76
76
        :param subscriber: The user or address to subscribe.
77
77
        :type email: ``IUser`` or ``IAddress``
78
 
        :return: None if the workflow completes with the member being
79
 
            subscribed.  If the workflow is paused for user confirmation or
80
 
            moderator approval, a 3-tuple is returned where the first element
81
 
            is a ``TokenOwner`` the second element is the token hash, and the
82
 
            third element is the subscribed member.
83
 
        :rtype: None or 2-tuple of (TokenOwner, str)
 
78
        :return: A 3-tuple is returned where the first element is the token
 
79
            hash, the second element is a ``TokenOwner`, and the third element
 
80
            is the subscribed member.  If the subscriber got subscribed
 
81
            immediately, the token will be None and the member will be
 
82
            an ``IMember``.  If the subscription got held, the token
 
83
            will be a hash and the member will be None.
 
84
        :rtype: (str-or-None, ``TokenOwner``, ``IMember``-or-None)
84
85
        :raises MembershipIsBannedError: when the address being subscribed
85
86
            appears in the global or list-centric bans.
86
87
        """
94
95
 
95
96
        :param token: A token matching a workflow.
96
97
        :type token: string
97
 
        :return: The new token for any follow up confirmation, or None if the
98
 
            user was subscribed.
99
 
        :rtype: str or None
 
98
        :return: A 3-tuple is returned where the first element is the token
 
99
            hash, the second element is a ``TokenOwner`, and the third element
 
100
            is the subscribed member.  If the subscriber got subscribed
 
101
            immediately, the token will be None and the member will be
 
102
            an ``IMember``.  If the subscription is still being held, the token
 
103
            will be a hash and the member will be None.
 
104
        :rtype: (str-or-None, ``TokenOwner``, ``IMember``-or-None)
100
105
        :raises LookupError: when no workflow is associated with the token.
101
106
        """
102
107