From 9a2b56638aaafc779a74b45c6cde339778fedafb Mon Sep 17 00:00:00 2001 From: Elmer Thomas Date: Wed, 2 Jan 2019 16:19:33 -0800 Subject: [PATCH 1/2] Fix #863 Not able to get the template list Fixes #863 --- packages/client/USAGE.md | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/packages/client/USAGE.md b/packages/client/USAGE.md index efcbed8a4..a78734d2b 100644 --- a/packages/client/USAGE.md +++ b/packages/client/USAGE.md @@ -4644,18 +4644,43 @@ Each user can create up to 300 different transactional templates. Transactional Transactional templates are templates explicitly created for transactional email and are not to be confused with [Marketing Campaigns templates](https://sendgrid.com/docs/User_Guide/Marketing_Campaigns/templates.html). For more information about transactional templates, please see our [User Guide](https://sendgrid.com/docs/User_Guide/Transactional_Templates/index.html). -### GET /templates +### GET all dynamic /templates + +```javascript + request.method = 'GET'; + request.url = '/v3/templates?generations=dynamic'; + client.request(request) + .then(([response, body]) => { + console.log(response.statusCode); + console.log(response.body); + }) +``` + +### GET all legacy /templates ```javascript request.method = 'GET'; - request.url = '/v3/templates'; + request.url = '/v3/templates?generations=legacy'; client.request(request) .then(([response, body]) => { console.log(response.statusCode); console.log(response.body); }) ``` + +### GET all /templates + +```javascript + request.method = 'GET'; + request.url = '/v3/templates?generations=legacy,dynamic'; + client.request(request) + .then(([response, body]) => { + console.log(response.statusCode); + console.log(response.body); + }) +``` + ## Delete a template. **This endpoint allows you to delete a transactional template.** From 0011b949dd9f7561f993aff451805936cd05abdf Mon Sep 17 00:00:00 2001 From: Elmer Thomas Date: Wed, 2 Jan 2019 16:34:21 -0800 Subject: [PATCH 2/2] Update LICENSE.md --- LICENSE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index 153c9978c..331900b06 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2012-2018 SendGrid, Inc. +Copyright (c) 2012-2019 SendGrid, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the