class MailingList(RESTObject): (source)
Undocumented
Method | __init__ |
No summary |
Method | __repr__ |
Undocumented |
Method | accept |
Shortcut for moderate_message. |
Method | accept |
Shortcut to accept a subscription request. |
Method | add |
Add a list moderator. |
Method | add |
Add a list owner. |
Method | add |
Add a new Member with a specific role. |
Method | archivers |
Undocumented |
Method | defer |
Shortcut for moderate_message. |
Method | defer |
Shortcut to defer a subscription request. |
Method | discard |
Shortcut for moderate_message. |
Method | discard |
Shortcut to discard a subscription request. |
Method | find |
Find a Mailinglist's members. |
Method | get |
Get a paginated list of bans for this MailingList. |
Method | get |
Get a count of held messages for the MailingList. |
Method | get |
Get a single held message for MailingList. |
Method | get |
Paginated list of held messages for the MailingList. |
Method | get |
Get a Member of the list. |
Method | get |
Return a paginated list of MailingList's members. |
Method | get |
Get a non-member of the list. |
Method | get |
Get an individual pending request for the given token. |
Method | get |
Return a list of dicts with subscription requests. |
Method | get |
Return a total count of pending subscription requests. |
Method | get |
Get roster of the MailingList. |
Method | is |
Given an address, checks if the given address is subscribed to this mailing list. |
Method | is |
Given an address, checks if the given address is a moderator of this mailing list. |
Method | is |
Given an address, checks if the given address is an owner of this mailing list. |
Method | is |
Given an address, checks if the given address is either a owner or a moderator of this list. |
Method | manage |
Alias for moderate_request, kept for compatibility |
Method | mass |
Unsubscribe a list of emails from a mailing list. |
Method | moderate |
Moderate a held message. |
Method | moderate |
Moderate a subscription request. |
Method | reject |
Shortcut for moderate_message. |
Method | reject |
Shortcut to reject a subscription request. |
Method | remove |
Remove a list moderator. |
Method | remove |
Remove a list owner. |
Method | remove |
Remove a list Member with a specific Role. |
Method | set |
Set a MailingList template URI. |
Method | subscribe |
Subscribe an email address to a mailing list. |
Method | unsubscribe |
Unsubscribe an email address from a mailing list. |
Property | archivers |
Get a list of MailingList archivers. |
Property | bans |
A list of banned addresses for this MailingList. |
Property | header |
A list of header-match rules for the MailingList. |
Property | held |
Held messages of a MailingList.. |
Property | members |
All MailingList members. |
Property | moderators |
All MailingList moderators. |
Property | nonmembers |
All MailingList non-members. |
Property | owners |
All MailingList owners. |
Property | requests |
See get_requests . |
Property | settings |
All MailingList settings. |
Property | templates |
Get a list of MailingList templates. |
Property | unsubscription |
Get a list of subscription requests pending moderator Approval. |
Method | _check |
Given an address and role, check if there is a membership record that matches the given address with a given role for this Mailing List. |
Method | _get |
Get a single membership resource. |
Class Variable | _properties |
Undocumented |
Instance Variable | _settings |
Undocumented |
Inherited from RESTObject
:
Method | __getattr__ |
Undocumented |
Method | __setattr__ |
Undocumented |
Method | delete |
Undocumented |
Inherited from RESTBase
(via RESTObject
):
Method | save |
Undocumented |
Property | rest |
Get data from API and cache it (only once per instance). |
Method | _get |
Undocumented |
Method | _reset |
Undocumented |
Method | _set |
Undocumented |
Class Variable | _autosave |
automatically send a PATCH request to the API when a value is changed. Otherwise, the save() method must be called. |
Class Variable | _read |
list of properties that cannot be written to (defaults to self_link only). |
Class Variable | _writable |
list of properties that can be written to using a PATCH request. If this value is None , all properties are writable. |
Instance Variable | _changed |
Undocumented |
Instance Variable | _connection |
Undocumented |
Instance Variable | _rest |
Undocumented |
Instance Variable | _url |
Undocumented |
Parameters | |
connection:Connection. | An API connection object. |
url:str. | The url of the API endpoint. |
data:dict. | The initial data to use. |
Shortcut for moderate_message.
Parameters | |
request | Undocumented |
str request | The request_id of the held message. |
Add a list moderator.
Parameters | |
address | Undocumented |
display | Undocumented |
str address | Email address of the moderator. |
str display | Display name of the moderator. |
Add a list owner.
Parameters | |
address | Undocumented |
display | Undocumented |
str address | Email address of the owner. |
str display | Display name of the Owner. |
Add a new Member with a specific role.
Parameters | |
role | Undocumented |
address | Undocumented |
display | Undocumented |
str role | The role for the new member. |
str address | A valid email address for the new Member. |
str display | An optional display name for the Member. |
Shortcut for moderate_message.
Parameters | |
request | Undocumented |
str request | The request_id of the held message. |
Shortcut for moderate_message.
Parameters | |
request | Undocumented |
str request | The request_id of the held message. |
Find a Mailinglist's members.
This provides a filtering API for list's Members including, non-members, owners and moderators by speciying the role.
Parameters | |
address | Undocumented |
role | Undocumented |
page | Undocumented |
count | Undocumented |
str address | Member's address. |
str role | Member's role. |
int page | Page number for paginated results. |
int count | Number of results per-page for paginated results. |
Get a paginated list of bans for this MailingList.
Parameters | |
count | Undocumented |
page | Undocumented |
int page | Page number for paginated results. |
int count | Number of results per-page for paginated results. |
Get a single held message for MailingList.
Parameters | |
held | Undocumented |
int held | Held message id to get. |
Paginated list of held messages for the MailingList.
Parameters | |
count | Undocumented |
page | Undocumented |
int page | Page number for paginated results. |
int count | Number of results per-page for paginated results. |
Get a Member of the list.
Parameters | |
Undocumented | |
address | The email address of the member for this list. |
Returns | |
A member proxy object. |
Return a paginated list of MailingList's members.
Parameters | |
count | Undocumented |
page | Undocumented |
fields | Undocumented |
int count | Count of members in one page. |
int page | The page number. |
Get a non-member of the list.
Parameters | |
Undocumented | |
address | The email address of the non-member for this list. |
Returns | |
A member proxy object. |
Get an individual pending request for the given token.
Parameters | |
token | The token for the request. |
Returns | |
The request dictionary. |
Return a list of dicts with subscription requests.
This is the new API for requests which allows filtering via
token_owner
since it isn't possible to do so via the property
requests.
Parameters | |
token | Who owns the pending requests? Should be one in 'no_one', 'moderator' and 'subscriber'. |
request | The type of pending request. Value should be in 'subscription' or 'unsubscription'. Defaults to 'subscription'. |
Return a total count of pending subscription requests.
This should be a faster query when all the requests aren't needed and only a count is needed to display on the badge in List's settings page.
Parameters | |
token | Who owns the pending requests? Should be one in 'no_one', 'moderator' and 'subscriber'. |
Returns | |
The count of pending requests. |
Get roster of the MailingList.
If the fields is specified without self_link
and address
, they are
added since it is required for returning the response.
Parameters | |
roster | Undocumented |
fields | Undocumented |
str roster | One of the Membership rosters from 'owner', 'moderator', 'member' and 'nonmember'. |
List of Member's fields to fetch from the API. Skipping certain fields can speed up the API response when they aren't required since they need to be fetched from database individually. |
Given an address, checks if the given address is either a owner or a moderator of this list.
It is possible for them to be both owner and moderator.
Unsubscribe a list of emails from a mailing list.
This function return a json of emails mapped to booleans based on whether they were unsubscribed or not, for whatever reasons
Parameters | |
email | list of emails to unsubscribe |
Moderate a held message.
Parameters | |
requestInt. | Id of the held message. |
action:String. | Action to perform on held message. |
comment:str | The reason for action, only supported for rejection. |
Moderate a subscription request.
Parameters | |
request | Undocumented |
action:str. | accept|reject|discard|defer |
reason:str | The reason associated with rejections. |
Shortcut for moderate_message.
Parameters | |
request | Undocumented |
reason | Undocumented |
str request | The request_id of the held message. |
str reason | An optional reason for rejection of the message. |
Remove a list moderator.
Parameters | |
address | Undocumented |
str address | Email address of the moderator to remove. |
Remove a list Member with a specific Role.
Parameters | |
role | Undocumented |
address | Undocumented |
str role | The role for the new member. |
str address | A valid email address for the new Member. |
Set a MailingList template URI.
Parameters | |
template | Undocumented |
uri | Undocumented |
username | Undocumented |
password | Undocumented |
str template | The name of the template. |
str uri | The URI to fetch the template. |
str username | Username for fetching template from uri. |
str password | Password for fetching template from uri. |
Subscribe an email address to a mailing list.
Parameters | |
address:str | Email address to subscribe to the list. |
displaystr | The real name of the new member. |
prebool | True if the address has been verified. |
prebool | True if membership has been approved by the user. |
prebool | True if membership is moderator-approved. |
invitation:bool | True if this is an invitation to join the list. |
sendbool | True if welcome message should be sent. |
delivery. | Delivery mode of the Member. |
delivery. | Delivery status of the Member. |
Returns | |
A member proxy object. |
Unsubscribe an email address from a mailing list.
Parameters | |
Undocumented | |
prebool | True if unsubscribe is approved by the user. |
prebool | True if unsubscribe is moderator-approved. |
address:str | Email address to unsubscribe. |
Given an address and role, check if there is a membership record that matches the given address with a given role for this Mailing List.
Get a single membership resource.
Parameters | |
Undocumented | |
role | The membership role. |
address | The email address of the member for this list. |
Returns | |
A member proxy object. |