Autoformat files with prettier

[MAILPOET-4075]
This commit is contained in:
Jan Jakes
2022-04-08 14:44:12 +02:00
committed by Veljko V
parent 2506ff5490
commit ab27eaee2d
592 changed files with 17992 additions and 12047 deletions

View File

@@ -9,26 +9,27 @@ In MailPoet, subscribers are organized into lists. This method provides function
It returns the new list. See [Get Lists](GetLists.md) for a list data structure description.
## Arguments
### `$list` (required)
An associative array which contains list data.
| Property | Type | Limits | Description |
| --- | --- | --- | --- |
| name (required) | string | 90 chars | A name of the list. |
| description (optional) | string\|null| 250 chars | A description of the list. |
| Property | Type | Limits | Description |
| ---------------------- | ------------ | --------- | -------------------------- |
| name (required) | string | 90 chars | A name of the list. |
| description (optional) | string\|null | 250 chars | A description of the list. |
## Error handling
All expected errors from the API are exceptions of class `\MailPoet\API\MP\v1\APIException`.
All expected errors from the API are exceptions of class `\MailPoet\API\MP\v1\APIException`.
Code of the exception is populated to distinguish between different errors.
An exception of base class `\Exception` can be thrown when something unexpected happens.
Codes description:
| Code | Description |
| --- | --- |
| 14 | Missing list name |
| 15 | Trying to create a list that already exists |
| 16 | The list couldnt be created in the database |
| Code | Description |
| ---- | -------------------------------------------- |
| 14 | Missing list name |
| 15 | Trying to create a list that already exists |
| 16 | The list couldnt be created in the database |