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

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

A set of mailing lists.
TextLine title The hard coded title.
Method new Register a new team mailing list.
Method get Return the IMailingList associated with the given team name.
Method getSubscriptionsForTeams Return a person's subscriptions to usable lists for a set of teams.
Method getSubscribedAddresses Return the set of subscribed email addresses for members.
Method getSenderAddresses Return the set of all email addresses for members.
Set approved_lists All mailing lists with status MailingListStatus.APPROVED.
Set active_lists All mailing lists with status MailingListStatus.ACTIVE.
Set modified_lists All mailing lists with status MailingListStatus.MODIFIED.
Set deactivated_lists All mailing lists with status MailingListStatus.DEACTIVATING.
Set unsynchronized_lists All mailing lists with unsynchronized state, e.g. MailingListStatus.CONSTRUCTING and MailingListStatus.UPDATING.
title =
The hard coded title.
def new(team, registrant=None):
Register a new team mailing list.

A mailing list for the team is registered and the resulting IMailingList is returned. The registration time will be set to the current time. The team must not yet have a mailing list.

ParametersteamThe team to register a new mailing list for.
registrantThe person registering the mailing list. This must be the team owner or one of the team admins. If None, the team owner is used.
RaisesAssertionErrorWhen team is not a team, already has a mailing list registered for it, or the registrant is not a team owner or admin.
def get(team_name):
Return the IMailingList associated with the given team name.
Parametersteam_nameThe name of the team to get the mailing list for.
ReturnsThe IMailingList for the named team or None if no mailing list is registered for the named team, or the team doesn't exist.
RaisesAssertionErrorWhen team_name is not a string.
def getSubscriptionsForTeams(person, teams):
Return a person's subscriptions to usable lists for a set of teams.

:param person: An `IPerson`.
:param teams: A list of `ITeam`s.
:return: A dictionary mapping team IDs to tuples of `IMailingList`
    IDs and `IMailingListSubscription` IDs; the second element will
    be None if a team has a list to which the person is not
    subscribed.
def getSubscribedAddresses(team_names):
Return the set of subscribed email addresses for members.
Parametersteam_namesThe set of teams to query. (type: sequence of strings)
ReturnsA dictionary of lists. The dictionary's keys are the team names given in the argument. The values are lists of 2-tuples for all the subscribed members of that mailing lists, in no particular order. This represents all the addresses which will receive messages posted to that mailing list. The 2-tuple is of the format (Full Name, email address) (type: dictionary mapping team names to lists of 2-tuples)
def getSenderAddresses(team_names):
Return the set of all email addresses for members.
Parametersteam_namesThe set of teams to query. (type: sequence of strings)
ReturnsA dictionary of lists. The dictionary's keys are the team names given in the argument. The values are lists of 2-tuples for all the members of that mailing list's team, in no particular order. This represents all the addresses which are allowed to post messages to that mailing list. The 2-tuple is of the format (Full Name, email address) (type: dictionary mapping team names to iterators)
approved_lists =
All mailing lists with status MailingListStatus.APPROVED.
active_lists =
All mailing lists with status MailingListStatus.ACTIVE.
modified_lists =
All mailing lists with status MailingListStatus.MODIFIED.
deactivated_lists =
All mailing lists with status MailingListStatus.DEACTIVATING.
unsynchronized_lists =
All mailing lists with unsynchronized state, e.g. MailingListStatus.CONSTRUCTING and MailingListStatus.UPDATING.
API Documentation for Launchpad, generated by pydoctor at 2020-08-07 00:00:07.