l.r.i.m.IMailingListAPIView(Interface) : interface documentation

Part of lp.registry.interfaces.mailinglist View In Hierarchy

XMLRPC API that Mailman polls for mailing list actions.
Method getPendingActions Get all pending mailing list actions.
Method reportStatus Report the status of mailing list actions.
Method getMembershipInformation Get membership information for the listed teams.
Method isTeamPublic Is the team with the given name public?
Method isRegisteredInLaunchpad Whether the address is a Launchpad member.
Method inGoodStanding Whether the address is a Launchpad member in good standing.
Method holdMessage Hold the message for approval though the Launchpad u/i.
Method getMessageDispositions Get all new message dispositions.
def getPendingActions():
Get all pending mailing list actions.

In addition, any mailing list for which there are actions pending will have their states transitioned to the next node in the workflow. For example, an APPROVED mailing list will be transitioned to CONSTRUCTING, and a MODIFIED mailing list will be transitioned to UPDATING.

Actions are strings, with the following valid values:

  • 'create' -- create the named team mailing list
  • 'deactivate' -- deactivate the named team mailing list
  • 'modify' -- modify an existing team mailing list

For the 'deactivate' action, the value items are just the team name for the list being deactivated. For the 'create' and 'modify' actions, the value items are 2-tuples where the first item is the team name and the second item is a dictionary of the list attributes to modify, for example 'welcome_message'.

There will be at most one action per team.

ReturnsA dictionary with keys being the action names and values being a sequence of values describing the details of each action.
def reportStatus(statuses):
Report the status of mailing list actions.

When Mailman processes the actions requested in getPendingActions(), it will report the status of those actions back to Launchpad.

In addition, any mailing list for which a status is being reported will have its state transitioned to the next node in the workflow. For example, a CONSTRUCTING or UPDATING mailing list will be transitioned to ACTIVE or FAILED depending on the status.

ParametersstatusesA dictionary mapping team names to result strings. The result strings may be either 'success' or 'failure'.
def getMembershipInformation(teams):
Get membership information for the listed teams.

The return value is of the format:

{team_name: [(address, realname, flags, status), ...], ...}

And each value contains an entry for all addresses that are subscribed to the mailing list linked to the named team.

ParametersteamsThe list of team names for which Mailman is requesting membership information.
ReturnsA data structure representing the requested information. See below for the format of that data structure. The records in values are sorted by email address.
def isTeamPublic(team_name):
Is the team with the given name public?
RaisesNoSuchPersonWithNameIf there's no team with the given name.
def isRegisteredInLaunchpad(address):
Whether the address is a Launchpad member.
ParametersaddressThe text email address to check.
ReturnsTrue if the address is a validated or preferred email address owned by a Launchpad member.
def inGoodStanding(address):
Whether the address is a Launchpad member in good standing.
ParametersaddressThe text email address to check.
ReturnsTrue if the address is a member of Launchpad in good or better standing (e.g. GOOD or EXCELLENT). False is returned if the address is not registered in Launchpad, or is assigned to a team.
def holdMessage(team_name, bytes):
Hold the message for approval though the Launchpad u/i.
Parametersteam_nameThe name of the team/mailing list that this message was posted to.
bytesThe original text of the message as bytes.
ReturnsTrue
def getMessageDispositions():
Get all new message dispositions.

This returns a dictionary mapping message ids to their disposition, which will either be 'accept', 'decline' or 'discard'. This only returns message-ids of disposed messages since the last time this method was called. Because this also acknowledges the pending states of such messages, it changes the state on the Launchpad server.

ReturnsA dictionary mapping message-ids to the disposition tuple. This tuple is of the form (team-name, action), where the action is either the string 'accept' or 'decline'.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.