Mailchimp PHP营销API传递请求参数

Mailchimp PHP营销API传递请求参数,mailchimp,mailchimp-api-v3.0,mailchimp-api-v3,Mailchimp,Mailchimp Api V3.0,Mailchimp Api V3,我正在使用Mailchimp的营销PHP API()检索模板列表。它有以下代码 <?php require_once '/path/to/MailchimpMarketing/vendor/autoload.php'; $client = new MailchimpMarketing\ApiClient(); $client->setConfig([ 'apiKey' => 'YOUR_API_KEY', 'server' => 'YOUR_SERVER

我正在使用Mailchimp的营销PHP API()检索模板列表。它有以下代码

<?php
require_once '/path/to/MailchimpMarketing/vendor/autoload.php';

$client = new MailchimpMarketing\ApiClient();
$client->setConfig([
    'apiKey' => 'YOUR_API_KEY',
    'server' => 'YOUR_SERVER_PREFIX',
]);

$response = $client->templates->list();
print_r($response);

我不确定这是否是一种正确的方法,但在查看API库源代码之后,我找到了包含请求参数的正确函数

<?php
require_once '/path/to/MailchimpMarketing/vendor/autoload.php';

$client = new MailchimpMarketing\ApiClient();
$client->setConfig([
    'apiKey' => 'YOUR_API_KEY',
    'server' => 'YOUR_SERVER_PREFIX',
]);

$response = $this->client->templates->listWithHttpInfo($fields = null, $exclude_fields = null, $count = '10', $offset = '0', $created_by = null, $since_created_at = null, $before_created_at = null, $type = 'user', $category = null, $folder_id = null, $sort_field = null);

print_r($response);

$response=$client->templates->get()@我不想返回一个特定的模板,而是从API返回一个模板列表,它的类型为user。默认情况下,它返回所有128个模板,我需要将其过滤掉。