Skip to content

Commit

Permalink
Finished documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Massimiliano Braglia committed Jun 9, 2017
1 parent c240266 commit fa0894b
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------
Expand Down

0 comments on commit fa0894b

Please sign in to comment.