summaryrefslogtreecommitdiffstats
path: root/examples/subusers/subusers.cs
diff options
context:
space:
mode:
authorElmer Thomas <elmer@thinkingserious.com>2016-06-09 20:04:46 -0700
committerElmer Thomas <elmer@thinkingserious.com>2016-06-09 20:04:46 -0700
commitbbca327f542b3d7e6f147250dc94a378e70ad240 (patch)
tree8788d6946d0de743946f7c66e0096c2b6a96928d /examples/subusers/subusers.cs
parentcb1aa7069247d69ea0d863511d02f124f2f209fb (diff)
downloadsendgrid-csharp-bbca327f542b3d7e6f147250dc94a378e70ad240.zip
sendgrid-csharp-bbca327f542b3d7e6f147250dc94a378e70ad240.tar.gz
sendgrid-csharp-bbca327f542b3d7e6f147250dc94a378e70ad240.tar.bz2
Formatting updates and links to /mail/send helper
Diffstat (limited to 'examples/subusers/subusers.cs')
-rw-r--r--examples/subusers/subusers.cs84
1 files changed, 42 insertions, 42 deletions
diff --git a/examples/subusers/subusers.cs b/examples/subusers/subusers.cs
index 22c68b7..208e13c 100644
--- a/examples/subusers/subusers.cs
+++ b/examples/subusers/subusers.cs
@@ -5,9 +5,9 @@ using System.Collections.Generic;
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
-##################################################
-# Create Subuser #
-# POST /subusers #
+////////////////////////////////////////////////////////
+// Create Subuser
+// POST /subusers
string data = @"{
'email': 'John@example.com',
@@ -24,9 +24,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# List all Subusers #
-# GET /subusers #
+////////////////////////////////////////////////////////
+// List all Subusers
+// GET /subusers
string queryParams = @"{
'limit': 0,
@@ -39,9 +39,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve Subuser Reputations #
-# GET /subusers/reputations #
+////////////////////////////////////////////////////////
+// Retrieve Subuser Reputations
+// GET /subusers/reputations
string queryParams = @"{
'usernames': 'test_string'
@@ -52,9 +52,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve email statistics for your subusers. #
-# GET /subusers/stats #
+////////////////////////////////////////////////////////
+// Retrieve email statistics for your subusers.
+// GET /subusers/stats
string queryParams = @"{
'aggregated_by': 'day',
@@ -70,9 +70,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve monthly stats for all subusers #
-# GET /subusers/stats/monthly #
+////////////////////////////////////////////////////////
+// Retrieve monthly stats for all subusers
+// GET /subusers/stats/monthly
string queryParams = @"{
'date': 'test_string',
@@ -88,9 +88,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve the totals for each email statistic metric for all subusers. #
-# GET /subusers/stats/sums #
+////////////////////////////////////////////////////////
+// Retrieve the totals for each email statistic metric for all subusers.
+// GET /subusers/stats/sums
string queryParams = @"{
'aggregated_by': 'day',
@@ -107,9 +107,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Enable/disable a subuser #
-# PATCH /subusers/{subuser_name} #
+////////////////////////////////////////////////////////
+// Enable/disable a subuser
+// PATCH /subusers/{subuser_name}
string data = @"{
'disabled': false
@@ -121,9 +121,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete a subuser #
-# DELETE /subusers/{subuser_name} #
+////////////////////////////////////////////////////////
+// Delete a subuser
+// DELETE /subusers/{subuser_name}
var subuser_name = "test_url_param";
dynamic response = sg.client.subusers._(subuser_name).delete();
@@ -132,9 +132,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update IPs assigned to a subuser #
-# PUT /subusers/{subuser_name}/ips #
+////////////////////////////////////////////////////////
+// Update IPs assigned to a subuser
+// PUT /subusers/{subuser_name}/ips
string data = @"[
'127.0.0.1'
@@ -146,9 +146,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Update Monitor Settings for a subuser #
-# PUT /subusers/{subuser_name}/monitor #
+////////////////////////////////////////////////////////
+// Update Monitor Settings for a subuser
+// PUT /subusers/{subuser_name}/monitor
string data = @"{
'email': 'example@example.com',
@@ -161,9 +161,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Create monitor settings #
-# POST /subusers/{subuser_name}/monitor #
+////////////////////////////////////////////////////////
+// Create monitor settings
+// POST /subusers/{subuser_name}/monitor
string data = @"{
'email': 'example@example.com',
@@ -176,9 +176,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve monitor settings for a subuser #
-# GET /subusers/{subuser_name}/monitor #
+////////////////////////////////////////////////////////
+// Retrieve monitor settings for a subuser
+// GET /subusers/{subuser_name}/monitor
var subuser_name = "test_url_param";
dynamic response = sg.client.subusers._(subuser_name).monitor.get();
@@ -187,9 +187,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Delete monitor settings #
-# DELETE /subusers/{subuser_name}/monitor #
+////////////////////////////////////////////////////////
+// Delete monitor settings
+// DELETE /subusers/{subuser_name}/monitor
var subuser_name = "test_url_param";
dynamic response = sg.client.subusers._(subuser_name).monitor.delete();
@@ -198,9 +198,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
Console.ReadLine();
-##################################################
-# Retrieve the monthly email statistics for a single subuser #
-# GET /subusers/{subuser_name}/stats/monthly #
+////////////////////////////////////////////////////////
+// Retrieve the monthly email statistics for a single subuser
+// GET /subusers/{subuser_name}/stats/monthly
string queryParams = @"{
'date': 'test_string',