src/Api/MailingList/Member.php
public function index(string $address, int $limit = 100, bool $subscribed = null)
    {
        Assert::stringNotEmpty($address);
        Assert::greaterThan($limit, 0);

        $params = [
            'limit' => $limit,
        ];

        if (true === $subscribed) {
            $params['subscribed'] = 'yes';
        } elseif (false === $subscribed) {
            $params['subscribed'] = 'no';
        }

        $response = $this->httpGet(sprintf('/v3/lists/%s/members/pages', $address), $params);

        return $this->hydrateResponse($response, IndexResponse::class);
    }
public function index(string $address, int $limit = 100, bool $subscribed = null)
    {
        Assert::stringNotEmpty($address);
        Assert::greaterThan($limit, 0);

        $params = [
            'limit' => $limit,
        ];

        if (true === $subscribed) {
            $params['subscribed'] = 'yes';
        } elseif (false === $subscribed) {
            $params['subscribed'] = 'no';
        }

        $response = $this->httpGet(sprintf('/v3/lists/%s/members/pages', $address), $params);

        return $this->hydrateResponse($response, IndexResponse::class);
    }
public function index ( string $ address , int $ limit = 100 , bool $ subscribed = null ) { Assert :: stringNotEmpty ( $ address ) ; Assert :: greaterThan ( $ limit , 0 ) ; $ params = [ 'limit' => $ limit , ] ; if ( true === $ subscribed ) { $ params [ 'subscribed' ] = 'yes' ; } elseif ( false === $ subscribed ) { $ params [ 'subscribed' ] = 'no' ; } $ response = $ this -> httpGet ( sprintf ( '/v3/lists/%s/members/pages' , $ address ) , $ params ) ; return $ this -> hydrateResponse ( $ response , IndexResponse :: class ) ; }
Returns a paginated list of members of the mailing list.

@param string    $address    Address of the mailing list
@param int       $limit      Maximum number of records to return (optional: 100 by default)
@param bool|null $subscribed `true` to lists subscribed, `false` for unsubscribed. list all if null

@return IndexResponse

@throws \Exception
Returns a paginated list of members of the mailing list .