forked from fazland/mailup-rest-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Massimiliano Braglia
committed
Jun 9, 2017
1 parent
c240266
commit fa0894b
Showing
1 changed file
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,8 +110,35 @@ $list->import($recipients); | |
``` | ||
|
||
### Groups | ||
Each `MailingList` can be split into multiple groups. The operations available are the following: | ||
- retrieve or modify its name: | ||
```php | ||
$group->getName(); | ||
$group->setName('Gondor Army'); | ||
``` | ||
- retrieve or modify its notes: | ||
```php | ||
$group->getNotes(); | ||
$group->setNotes('10.000 knights and 20.000 peons'); | ||
``` | ||
- prevent or allow deletion: | ||
```php | ||
$group->isDeletable(); | ||
$group->setDeletable(true); | ||
``` | ||
- delete: | ||
```php | ||
$group->delete(); | ||
``` | ||
- add, remove or retrieve the recipients: | ||
```php | ||
use Fazland\MailUpRestClient\Recipient; | ||
|
||
... | ||
$legolas = new Recipient('Legolas Thranduilion', '[email protected]', '3334444444', '+39'); | ||
$group->addRecipient($legolas); | ||
$group->removeRecipient($legolas); | ||
$lothlorienCitizens = $group->getRecipients(); | ||
``` | ||
|
||
Contributing | ||
------------ | ||
|