| @@ 41-54 (lines=14) @@ | ||
| 38 | * |
|
| 39 | * @return IndexResponse |
|
| 40 | */ |
|
| 41 | public function index($limit = 100, $skip = 0) |
|
| 42 | { |
|
| 43 | Assert::integer($limit); |
|
| 44 | Assert::integer($skip); |
|
| 45 | ||
| 46 | $params = [ |
|
| 47 | 'limit' => $limit, |
|
| 48 | 'skip' => $skip, |
|
| 49 | ]; |
|
| 50 | ||
| 51 | $response = $this->httpGet('/v3/domains', $params); |
|
| 52 | ||
| 53 | return $this->hydrateResponse($response, IndexResponse::class); |
|
| 54 | } |
|
| 55 | ||
| 56 | /** |
|
| 57 | * Returns a single domain. |
|
| @@ 39-51 (lines=13) @@ | ||
| 36 | * |
|
| 37 | * @throws \Exception |
|
| 38 | */ |
|
| 39 | public function pages($limit = 100) |
|
| 40 | { |
|
| 41 | Assert::integer($limit); |
|
| 42 | Assert::greaterThan($limit, 0); |
|
| 43 | ||
| 44 | $params = [ |
|
| 45 | 'limit' => $limit, |
|
| 46 | ]; |
|
| 47 | ||
| 48 | $response = $this->httpGet('/v3/lists/pages', $params); |
|
| 49 | ||
| 50 | return $this->hydrateResponse($response, PagesResponse::class); |
|
| 51 | } |
|
| 52 | ||
| 53 | /** |
|
| 54 | * Creates a new mailing list on the current domain. |
|
| @@ 35-47 (lines=13) @@ | ||
| 32 | * |
|
| 33 | * @return IndexResponse|ResponseInterface |
|
| 34 | */ |
|
| 35 | public function index($domain, $limit = 100) |
|
| 36 | { |
|
| 37 | Assert::stringNotEmpty($domain); |
|
| 38 | Assert::integer($limit); |
|
| 39 | ||
| 40 | $params = [ |
|
| 41 | 'limit' => $limit, |
|
| 42 | ]; |
|
| 43 | ||
| 44 | $response = $this->httpGet(sprintf('/v3/%s/tags', $domain), $params); |
|
| 45 | ||
| 46 | return $this->hydrateResponse($response, IndexResponse::class); |
|
| 47 | } |
|
| 48 | ||
| 49 | /** |
|
| 50 | * Returns a single tag. |
|