summaryrefslogtreecommitdiffstats
path: root/examples/templates/templates.cs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/templates/templates.cs')
-rw-r--r--examples/templates/templates.cs60
1 files changed, 30 insertions, 30 deletions
diff --git a/examples/templates/templates.cs b/examples/templates/templates.cs
index f148a20..beea4d0 100644
--- a/examples/templates/templates.cs
+++ b/examples/templates/templates.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Create a transactional template. #
-# POST /templates #
+////////////////////////////////////////////////////////
+// Create a transactional template.
+// POST /templates
string data = @"{
'name': 'example_name'
@@ -18,9 +18,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve all transactional templates. #
-# GET /templates #
+////////////////////////////////////////////////////////
+// Retrieve all transactional templates.
+// GET /templates
dynamic response = sg.client.templates.get();
Console.WriteLine(response.StatusCode);
@@ -28,9 +28,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Edit a transactional template. #
-# PATCH /templates/{template_id} #
+////////////////////////////////////////////////////////
+// Edit a transactional template.
+// PATCH /templates/{template_id}
string data = @"{
'name': 'new_example_name'
@@ -42,9 +42,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve a single transactional template. #
-# GET /templates/{template_id} #
+////////////////////////////////////////////////////////
+// Retrieve a single transactional template.
+// GET /templates/{template_id}
var template_id = "test_url_param";
dynamic response = sg.client.templates._(template_id).get();
@@ -53,9 +53,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete a template. #
-# DELETE /templates/{template_id} #
+////////////////////////////////////////////////////////
+// Delete a template.
+// DELETE /templates/{template_id}
var template_id = "test_url_param";
dynamic response = sg.client.templates._(template_id).delete();
@@ -64,9 +64,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Create a new transactional template version. #
-# POST /templates/{template_id}/versions #
+////////////////////////////////////////////////////////
+// Create a new transactional template version.
+// POST /templates/{template_id}/versions
string data = @"{
'active': 1,
@@ -83,9 +83,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Edit a transactional template version. #
-# PATCH /templates/{template_id}/versions/{version_id} #
+////////////////////////////////////////////////////////
+// Edit a transactional template version.
+// PATCH /templates/{template_id}/versions/{version_id}
string data = @"{
'active': 1,
@@ -102,9 +102,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve a specific transactional template version. #
-# GET /templates/{template_id}/versions/{version_id} #
+////////////////////////////////////////////////////////
+// Retrieve a specific transactional template version.
+// GET /templates/{template_id}/versions/{version_id}
var template_id = "test_url_param";
var version_id = "test_url_param";
@@ -114,9 +114,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete a transactional template version. #
-# DELETE /templates/{template_id}/versions/{version_id} #
+////////////////////////////////////////////////////////
+// Delete a transactional template version.
+// DELETE /templates/{template_id}/versions/{version_id}
var template_id = "test_url_param";
var version_id = "test_url_param";
@@ -126,9 +126,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Activate a transactional template version. #
-# POST /templates/{template_id}/versions/{version_id}/activate #
+////////////////////////////////////////////////////////
+// Activate a transactional template version.
+// POST /templates/{template_id}/versions/{version_id}/activate
var template_id = "test_url_param";
var version_id = "test_url_param";