Get all templates associated with the Server.
public listTemplates ( integer $count = 100, integer $offset ) : Postmark\Models\DynamicResponseModel | ||
$count | integer | The total number of templates to get at once (default is 100) |
$offset | integer | The number of templates to "Skip" before returning results. |
Résultat | Postmark\Models\DynamicResponseModel |
function testClientCanListTemplates() { $tk = parent::$testKeys; $client = new PostmarkClient($tk->WRITE_TEST_SERVER_TOKEN, $tk->TEST_TIMEOUT); for ($i = 0; $i < 5; $i++) { $client->createTemplate('test-php-template-' . $i . '-' . date('c'), "{{subject}}", "Hello <b>{{name}}</b>!", "Hello {{name}}!"); } $result = $client->listTemplates(); $this->assertNotEmpty($result->Templates); }