diff options
author | Elmer Thomas <elmer@thinkingserious.com> | 2016-06-09 20:04:46 -0700 |
---|---|---|
committer | Elmer Thomas <elmer@thinkingserious.com> | 2016-06-09 20:04:46 -0700 |
commit | bbca327f542b3d7e6f147250dc94a378e70ad240 (patch) | |
tree | 8788d6946d0de743946f7c66e0096c2b6a96928d /examples | |
parent | cb1aa7069247d69ea0d863511d02f124f2f209fb (diff) | |
download | sendgrid-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')
-rw-r--r-- | examples/accesssettings/accesssettings.cs | 36 | ||||
-rw-r--r-- | examples/apikeys/apikeys.cs | 36 | ||||
-rw-r--r-- | examples/asm/asm.cs | 98 | ||||
-rw-r--r-- | examples/browsers/browsers.cs | 6 | ||||
-rw-r--r-- | examples/campaigns/campaigns.cs | 66 | ||||
-rw-r--r-- | examples/categories/categories.cs | 18 | ||||
-rw-r--r-- | examples/clients/clients.cs | 12 | ||||
-rw-r--r-- | examples/contactdb/contactdb.cs | 186 | ||||
-rw-r--r-- | examples/devices/devices.cs | 6 | ||||
-rw-r--r-- | examples/geo/geo.cs | 6 | ||||
-rw-r--r-- | examples/ips/ips.cs | 84 | ||||
-rw-r--r-- | examples/mail/mail.cs | 19 | ||||
-rw-r--r-- | examples/mailboxproviders/mailboxproviders.cs | 6 | ||||
-rw-r--r-- | examples/mailsettings/mailsettings.cs | 114 | ||||
-rw-r--r-- | examples/partnersettings/partnersettings.cs | 18 | ||||
-rw-r--r-- | examples/scopes/scopes.cs | 6 | ||||
-rw-r--r-- | examples/stats/stats.cs | 6 | ||||
-rw-r--r-- | examples/subusers/subusers.cs | 84 | ||||
-rw-r--r-- | examples/suppression/suppression.cs | 102 | ||||
-rw-r--r-- | examples/templates/templates.cs | 60 | ||||
-rw-r--r-- | examples/trackingsettings/trackingsettings.cs | 54 | ||||
-rw-r--r-- | examples/user/user.cs | 126 | ||||
-rw-r--r-- | examples/whitelabel/whitelabel.cs | 162 |
23 files changed, 668 insertions, 643 deletions
diff --git a/examples/accesssettings/accesssettings.cs b/examples/accesssettings/accesssettings.cs index 25f561f..15fe8b0 100644 --- a/examples/accesssettings/accesssettings.cs +++ b/examples/accesssettings/accesssettings.cs @@ -5,9 +5,9 @@ using System.Collections.Generic; string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User); dynamic sg = new SendGrid.SendGridAPIClient(_apiKey); -################################################## -# Retrieve all recent access attempts # -# GET /access_settings/activity # +//////////////////////////////////////////////////////// +// Retrieve all recent access attempts +// GET /access_settings/activity string queryParams = @"{ 'limit': 1 @@ -18,9 +18,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Add one or more IPs to the whitelist # -# POST /access_settings/whitelist # +//////////////////////////////////////////////////////// +// Add one or more IPs to the whitelist +// POST /access_settings/whitelist string data = @"{ 'ips': [ @@ -41,9 +41,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve a list of currently whitelisted IPs # -# GET /access_settings/whitelist # +//////////////////////////////////////////////////////// +// Retrieve a list of currently whitelisted IPs +// GET /access_settings/whitelist dynamic response = sg.client.access_settings.whitelist.get(); Console.WriteLine(response.StatusCode); @@ -51,9 +51,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Remove one or more IPs from the whitelist # -# DELETE /access_settings/whitelist # +//////////////////////////////////////////////////////// +// Remove one or more IPs from the whitelist +// DELETE /access_settings/whitelist string data = @"{ 'ids': [ @@ -68,9 +68,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve a specific whitelisted IP # -# GET /access_settings/whitelist/{rule_id} # +//////////////////////////////////////////////////////// +// Retrieve a specific whitelisted IP +// GET /access_settings/whitelist/{rule_id} var rule_id = "test_url_param"; dynamic response = sg.client.access_settings.whitelist._(rule_id).get(); @@ -79,9 +79,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Remove a specific IP from the whitelist # -# DELETE /access_settings/whitelist/{rule_id} # +//////////////////////////////////////////////////////// +// Remove a specific IP from the whitelist +// DELETE /access_settings/whitelist/{rule_id} var rule_id = "test_url_param"; dynamic response = sg.client.access_settings.whitelist._(rule_id).delete(); diff --git a/examples/apikeys/apikeys.cs b/examples/apikeys/apikeys.cs index 75eb536..eff23ec 100644 --- a/examples/apikeys/apikeys.cs +++ b/examples/apikeys/apikeys.cs @@ -5,9 +5,9 @@ using System.Collections.Generic; string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User); dynamic sg = new SendGrid.SendGridAPIClient(_apiKey); -################################################## -# Create API keys # -# POST /api_keys # +//////////////////////////////////////////////////////// +// Create API keys +// POST /api_keys string data = @"{ 'name': 'My API Key', @@ -23,9 +23,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve all API Keys belonging to the authenticated user # -# GET /api_keys # +//////////////////////////////////////////////////////// +// Retrieve all API Keys belonging to the authenticated user +// GET /api_keys dynamic response = sg.client.api_keys.get(); Console.WriteLine(response.StatusCode); @@ -33,9 +33,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update the name & scopes of an API Key # -# PUT /api_keys/{api_key_id} # +//////////////////////////////////////////////////////// +// Update the name & scopes of an API Key +// PUT /api_keys/{api_key_id} string data = @"{ 'name': 'A New Hope', @@ -51,9 +51,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update API keys # -# PATCH /api_keys/{api_key_id} # +//////////////////////////////////////////////////////// +// Update API keys +// PATCH /api_keys/{api_key_id} string data = @"{ 'name': 'A New Hope' @@ -65,9 +65,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve an existing API Key # -# GET /api_keys/{api_key_id} # +//////////////////////////////////////////////////////// +// Retrieve an existing API Key +// GET /api_keys/{api_key_id} var api_key_id = "test_url_param"; dynamic response = sg.client.api_keys._(api_key_id).get(); @@ -76,9 +76,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete API keys # -# DELETE /api_keys/{api_key_id} # +//////////////////////////////////////////////////////// +// Delete API keys +// DELETE /api_keys/{api_key_id} var api_key_id = "test_url_param"; dynamic response = sg.client.api_keys._(api_key_id).delete(); diff --git a/examples/asm/asm.cs b/examples/asm/asm.cs index 14cd77c..4f5bde7 100644 --- a/examples/asm/asm.cs +++ b/examples/asm/asm.cs @@ -5,14 +5,14 @@ using System.Collections.Generic; string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User); dynamic sg = new SendGrid.SendGridAPIClient(_apiKey); -################################################## -# Create a Group # -# POST /asm/groups # +//////////////////////////////////////////////////////// +// Create a new suppression group +// POST /asm/groups string data = @"{ - 'description': 'A group description', - 'is_default': false, - 'name': 'A group name' + 'description': 'Suggestions for products our users might like.', + 'is_default': true, + 'name': 'Product Suggestions' }"; dynamic response = sg.client.asm.groups.post(requestBody: data); Console.WriteLine(response.StatusCode); @@ -20,19 +20,22 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve all suppression groups associated with the user. # -# GET /asm/groups # +//////////////////////////////////////////////////////// +// Retrieve information about multiple suppression groups +// GET /asm/groups -dynamic response = sg.client.asm.groups.get(); +string queryParams = @"{ + 'id': 1 +}"; +dynamic response = sg.client.asm.groups.get(queryParams: queryParams); Console.WriteLine(response.StatusCode); Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update a suppression group. # -# PATCH /asm/groups/{group_id} # +//////////////////////////////////////////////////////// +// Update a suppression group. +// PATCH /asm/groups/{group_id} string data = @"{ 'description': 'Suggestions for items our users might like.', @@ -46,9 +49,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Get information on a single suppression group. # -# GET /asm/groups/{group_id} # +//////////////////////////////////////////////////////// +// Get information on a single suppression group. +// GET /asm/groups/{group_id} var group_id = "test_url_param"; dynamic response = sg.client.asm.groups._(group_id).get(); @@ -57,9 +60,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete a suppression group. # -# DELETE /asm/groups/{group_id} # +//////////////////////////////////////////////////////// +// Delete a suppression group. +// DELETE /asm/groups/{group_id} var group_id = "test_url_param"; dynamic response = sg.client.asm.groups._(group_id).delete(); @@ -68,9 +71,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Add suppressions to a suppression group # -# POST /asm/groups/{group_id}/suppressions # +//////////////////////////////////////////////////////// +// Add suppressions to a suppression group +// POST /asm/groups/{group_id}/suppressions string data = @"{ 'recipient_emails': [ @@ -85,9 +88,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve all suppressions for a suppression group # -# GET /asm/groups/{group_id}/suppressions # +//////////////////////////////////////////////////////// +// Retrieve all suppressions for a suppression group +// GET /asm/groups/{group_id}/suppressions var group_id = "test_url_param"; dynamic response = sg.client.asm.groups._(group_id).suppressions.get(); @@ -96,9 +99,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete a suppression from a suppression group # -# DELETE /asm/groups/{group_id}/suppressions/{email} # +//////////////////////////////////////////////////////// +// Delete a suppression from a suppression group +// DELETE /asm/groups/{group_id}/suppressions/{email} var group_id = "test_url_param"; var email = "test_url_param"; @@ -108,9 +111,19 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Add recipient addresses to the global suppression group. # -# POST /asm/suppressions/global # +//////////////////////////////////////////////////////// +// Retrieve all suppressions +// GET /asm/suppressions + +dynamic response = sg.client.asm.suppressions.get(); +Console.WriteLine(response.StatusCode); +Console.WriteLine(response.Body.ReadAsStringAsync().Result); +Console.WriteLine(response.Headers.ToString()); +Console.ReadLine(); + +//////////////////////////////////////////////////////// +// Add recipient addresses to the global suppression group. +// POST /asm/suppressions/global string data = @"{ 'recipient_emails': [ @@ -124,9 +137,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve a Global Suppression # -# GET /asm/suppressions/global/{email} # +//////////////////////////////////////////////////////// +// Retrieve a Global Suppression +// GET /asm/suppressions/global/{email} var email = "test_url_param"; dynamic response = sg.client.asm.suppressions.global._(email).get(); @@ -135,9 +148,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete a Global Suppression # -# DELETE /asm/suppressions/global/{email} # +//////////////////////////////////////////////////////// +// Delete a Global Suppression +// DELETE /asm/suppressions/global/{email} var email = "test_url_param"; dynamic response = sg.client.asm.suppressions.global._(email).delete(); @@ -146,3 +159,14 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); +//////////////////////////////////////////////////////// +// Retrieve all suppression groups for an email address +// GET /asm/suppressions/{email} + +var email = "test_url_param"; +dynamic response = sg.client.asm.suppressions._(email).get(); +Console.WriteLine(response.StatusCode); +Console.WriteLine(response.Body.ReadAsStringAsync().Result); +Console.WriteLine(response.Headers.ToString()); +Console.ReadLine(); + diff --git a/examples/browsers/browsers.cs b/examples/browsers/browsers.cs index e75de7b..43d52e5 100644 --- a/examples/browsers/browsers.cs +++ b/examples/browsers/browsers.cs @@ -5,9 +5,9 @@ using System.Collections.Generic; string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User); dynamic sg = new SendGrid.SendGridAPIClient(_apiKey); -################################################## -# Retrieve email statistics by browser. # -# GET /browsers/stats # +//////////////////////////////////////////////////////// +// Retrieve email statistics by browser. +// GET /browsers/stats string queryParams = @"{ 'aggregated_by': 'day', diff --git a/examples/campaigns/campaigns.cs b/examples/campaigns/campaigns.cs index fbae7f4..03bbadc 100644 --- a/examples/campaigns/campaigns.cs +++ b/examples/campaigns/campaigns.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 Campaign # -# POST /campaigns # +//////////////////////////////////////////////////////// +// Create a Campaign +// POST /campaigns string data = @"{ 'categories': [ @@ -35,9 +35,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve all Campaigns # -# GET /campaigns # +//////////////////////////////////////////////////////// +// Retrieve all Campaigns +// GET /campaigns string queryParams = @"{ 'limit': 0, @@ -49,9 +49,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update a Campaign # -# PATCH /campaigns/{campaign_id} # +//////////////////////////////////////////////////////// +// Update a Campaign +// PATCH /campaigns/{campaign_id} string data = @"{ 'categories': [ @@ -69,9 +69,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve a single campaign # -# GET /campaigns/{campaign_id} # +//////////////////////////////////////////////////////// +// Retrieve a single campaign +// GET /campaigns/{campaign_id} var campaign_id = "test_url_param"; dynamic response = sg.client.campaigns._(campaign_id).get(); @@ -80,9 +80,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete a Campaign # -# DELETE /campaigns/{campaign_id} # +//////////////////////////////////////////////////////// +// Delete a Campaign +// DELETE /campaigns/{campaign_id} var campaign_id = "test_url_param"; dynamic response = sg.client.campaigns._(campaign_id).delete(); @@ -91,9 +91,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update a Scheduled Campaign # -# PATCH /campaigns/{campaign_id}/schedules # +//////////////////////////////////////////////////////// +// Update a Scheduled Campaign +// PATCH /campaigns/{campaign_id}/schedules string data = @"{ 'send_at': 1489451436 @@ -105,9 +105,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Schedule a Campaign # -# POST /campaigns/{campaign_id}/schedules # +//////////////////////////////////////////////////////// +// Schedule a Campaign +// POST /campaigns/{campaign_id}/schedules string data = @"{ 'send_at': 1489771528 @@ -119,9 +119,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# View Scheduled Time of a Campaign # -# GET /campaigns/{campaign_id}/schedules # +//////////////////////////////////////////////////////// +// View Scheduled Time of a Campaign +// GET /campaigns/{campaign_id}/schedules var campaign_id = "test_url_param"; dynamic response = sg.client.campaigns._(campaign_id).schedules.get(); @@ -130,9 +130,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Unschedule a Scheduled Campaign # -# DELETE /campaigns/{campaign_id}/schedules # +//////////////////////////////////////////////////////// +// Unschedule a Scheduled Campaign +// DELETE /campaigns/{campaign_id}/schedules var campaign_id = "test_url_param"; dynamic response = sg.client.campaigns._(campaign_id).schedules.delete(); @@ -141,9 +141,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Send a Campaign # -# POST /campaigns/{campaign_id}/schedules/now # +//////////////////////////////////////////////////////// +// Send a Campaign +// POST /campaigns/{campaign_id}/schedules/now var campaign_id = "test_url_param"; dynamic response = sg.client.campaigns._(campaign_id).schedules.now.post(); @@ -152,9 +152,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Send a Test Campaign # -# POST /campaigns/{campaign_id}/schedules/test # +//////////////////////////////////////////////////////// +// Send a Test Campaign +// POST /campaigns/{campaign_id}/schedules/test string data = @"{ 'to': 'your.email@example.com' diff --git a/examples/categories/categories.cs b/examples/categories/categories.cs index c8fe5cc..82899ea 100644 --- a/examples/categories/categories.cs +++ b/examples/categories/categories.cs @@ -5,9 +5,9 @@ using System.Collections.Generic; string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User); dynamic sg = new SendGrid.SendGridAPIClient(_apiKey); -################################################## -# Retrieve all categories # -# GET /categories # +//////////////////////////////////////////////////////// +// Retrieve all categories +// GET /categories string queryParams = @"{ 'category': 'test_string', @@ -20,9 +20,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve Email Statistics for Categories # -# GET /categories/stats # +//////////////////////////////////////////////////////// +// Retrieve Email Statistics for Categories +// GET /categories/stats string queryParams = @"{ 'aggregated_by': 'day', @@ -38,9 +38,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve sums of email stats for each category [Needs: Stats object defined, has category ID?] # -# GET /categories/stats/sums # +//////////////////////////////////////////////////////// +// Retrieve sums of email stats for each category [Needs: Stats object defined, has category ID?] +// GET /categories/stats/sums string queryParams = @"{ 'aggregated_by': 'day', diff --git a/examples/clients/clients.cs b/examples/clients/clients.cs index e275267..ecefdcd 100644 --- a/examples/clients/clients.cs +++ b/examples/clients/clients.cs @@ -5,9 +5,9 @@ using System.Collections.Generic; string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User); dynamic sg = new SendGrid.SendGridAPIClient(_apiKey); -################################################## -# Retrieve email statistics by client type. # -# GET /clients/stats # +//////////////////////////////////////////////////////// +// Retrieve email statistics by client type. +// GET /clients/stats string queryParams = @"{ 'aggregated_by': 'day', @@ -20,9 +20,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve stats by a specific client type. # -# GET /clients/{client_type}/stats # +//////////////////////////////////////////////////////// +// Retrieve stats by a specific client type. +// GET /clients/{client_type}/stats string queryParams = @"{ 'aggregated_by': 'day', diff --git a/examples/contactdb/contactdb.cs b/examples/contactdb/contactdb.cs index 639d060..ea388d2 100644 --- a/examples/contactdb/contactdb.cs +++ b/examples/contactdb/contactdb.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 Custom Field # -# POST /contactdb/custom_fields # +//////////////////////////////////////////////////////// +// Create a Custom Field +// POST /contactdb/custom_fields string data = @"{ 'name': 'pet', @@ -19,9 +19,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve all custom fields # -# GET /contactdb/custom_fields # +//////////////////////////////////////////////////////// +// Retrieve all custom fields +// GET /contactdb/custom_fields dynamic response = sg.client.contactdb.custom_fields.get(); Console.WriteLine(response.StatusCode); @@ -29,9 +29,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve a Custom Field # -# GET /contactdb/custom_fields/{custom_field_id} # +//////////////////////////////////////////////////////// +// Retrieve a Custom Field +// GET /contactdb/custom_fields/{custom_field_id} var custom_field_id = "test_url_param"; dynamic response = sg.client.contactdb.custom_fields._(custom_field_id).get(); @@ -40,9 +40,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete a Custom Field # -# DELETE /contactdb/custom_fields/{custom_field_id} # +//////////////////////////////////////////////////////// +// Delete a Custom Field +// DELETE /contactdb/custom_fields/{custom_field_id} var custom_field_id = "test_url_param"; dynamic response = sg.client.contactdb.custom_fields._(custom_field_id).delete(); @@ -51,9 +51,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Create a List # -# POST /contactdb/lists # +//////////////////////////////////////////////////////// +// Create a List +// POST /contactdb/lists string data = @"{ 'name': 'your list name' @@ -64,9 +64,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve all lists # -# GET /contactdb/lists # +//////////////////////////////////////////////////////// +// Retrieve all lists +// GET /contactdb/lists dynamic response = sg.client.contactdb.lists.get(); Console.WriteLine(response.StatusCode); @@ -74,9 +74,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete Multiple lists # -# DELETE /contactdb/lists # +//////////////////////////////////////////////////////// +// Delete Multiple lists +// DELETE /contactdb/lists string data = @"[ 1, @@ -90,9 +90,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update a List # -# PATCH /contactdb/lists/{list_id} # +//////////////////////////////////////////////////////// +// Update a List +// PATCH /contactdb/lists/{list_id} string data = @"{ 'name': 'newlistname' @@ -107,9 +107,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve a single list # -# GET /contactdb/lists/{list_id} # +//////////////////////////////////////////////////////// +// Retrieve a single list +// GET /contactdb/lists/{list_id} string queryParams = @"{ 'list_id': 0 @@ -121,9 +121,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete a List # -# DELETE /contactdb/lists/{list_id} # +//////////////////////////////////////////////////////// +// Delete a List +// DELETE /contactdb/lists/{list_id} string queryParams = @"{ 'delete_contacts': 'true' @@ -135,9 +135,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Add Multiple Recipients to a List # -# POST /contactdb/lists/{list_id}/recipients # +//////////////////////////////////////////////////////// +// Add Multiple Recipients to a List +// POST /contactdb/lists/{list_id}/recipients string data = @"[ 'recipient_id1', @@ -150,9 +150,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve all recipients on a List # -# GET /contactdb/lists/{list_id}/recipients # +//////////////////////////////////////////////////////// +// Retrieve all recipients on a List +// GET /contactdb/lists/{list_id}/recipients string queryParams = @"{ 'list_id': 0, @@ -166,9 +166,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Add a Single Recipient to a List # -# POST /contactdb/lists/{list_id}/recipients/{recipient_id} # +//////////////////////////////////////////////////////// +// Add a Single Recipient to a List +// POST /contactdb/lists/{list_id}/recipients/{recipient_id} var list_id = "test_url_param"; var recipient_id = "test_url_param"; @@ -178,9 +178,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete a Single Recipient from a Single List # -# DELETE /contactdb/lists/{list_id}/recipients/{recipient_id} # +//////////////////////////////////////////////////////// +// Delete a Single Recipient from a Single List +// DELETE /contactdb/lists/{list_id}/recipients/{recipient_id} string queryParams = @"{ 'list_id': 0, @@ -194,9 +194,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update Recipient # -# PATCH /contactdb/recipients # +//////////////////////////////////////////////////////// +// Update Recipient +// PATCH /contactdb/recipients string data = @"[ { @@ -211,9 +211,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Add recipients # -# POST /contactdb/recipients # +//////////////////////////////////////////////////////// +// Add recipients +// POST /contactdb/recipients string data = @"[ { @@ -235,9 +235,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve recipients # -# GET /contactdb/recipients # +//////////////////////////////////////////////////////// +// Retrieve recipients +// GET /contactdb/recipients string queryParams = @"{ 'page': 1, @@ -249,9 +249,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete Recipient # -# DELETE /contactdb/recipients # +//////////////////////////////////////////////////////// +// Delete Recipient +// DELETE /contactdb/recipients string data = @"[ 'recipient_id1', @@ -263,9 +263,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve the count of billable recipients # -# GET /contactdb/recipients/billable_count # +//////////////////////////////////////////////////////// +// Retrieve the count of billable recipients +// GET /contactdb/recipients/billable_count dynamic response = sg.client.contactdb.recipients.billable_count.get(); Console.WriteLine(response.StatusCode); @@ -273,9 +273,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve a Count of Recipients # -# GET /contactdb/recipients/count # +//////////////////////////////////////////////////////// +// Retrieve a Count of Recipients +// GET /contactdb/recipients/count dynamic response = sg.client.contactdb.recipients.count.get(); Console.WriteLine(response.StatusCode); @@ -283,9 +283,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve recipients matching search criteria # -# GET /contactdb/recipients/search # +//////////////////////////////////////////////////////// +// Retrieve recipients matching search criteria +// GET /contactdb/recipients/search string queryParams = @"{ '{field_name}': 'test_string' @@ -296,9 +296,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve a single recipient # -# GET /contactdb/recipients/{recipient_id} # +//////////////////////////////////////////////////////// +// Retrieve a single recipient +// GET /contactdb/recipients/{recipient_id} var recipient_id = "test_url_param"; dynamic response = sg.client.contactdb.recipients._(recipient_id).get(); @@ -307,9 +307,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete a Recipient # -# DELETE /contactdb/recipients/{recipient_id} # +//////////////////////////////////////////////////////// +// Delete a Recipient +// DELETE /contactdb/recipients/{recipient_id} var recipient_id = "test_url_param"; dynamic response = sg.client.contactdb.recipients._(recipient_id).delete(); @@ -318,9 +318,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve the lists that a recipient is on # -# GET /contactdb/recipients/{recipient_id}/lists # +//////////////////////////////////////////////////////// +// Retrieve the lists that a recipient is on +// GET /contactdb/recipients/{recipient_id}/lists var recipient_id = "test_url_param"; dynamic response = sg.client.contactdb.recipients._(recipient_id).lists.get(); @@ -329,9 +329,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve reserved fields # -# GET /contactdb/reserved_fields # +//////////////////////////////////////////////////////// +// Retrieve reserved fields +// GET /contactdb/reserved_fields dynamic response = sg.client.contactdb.reserved_fields.get(); Console.WriteLine(response.StatusCode); @@ -339,9 +339,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Create a Segment # -# POST /contactdb/segments # +//////////////////////////////////////////////////////// +// Create a Segment +// POST /contactdb/segments string data = @"{ 'conditions': [ @@ -373,9 +373,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve all segments # -# GET /contactdb/segments # +//////////////////////////////////////////////////////// +// Retrieve all segments +// GET /contactdb/segments dynamic response = sg.client.contactdb.segments.get(); Console.WriteLine(response.StatusCode); @@ -383,9 +383,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update a segment # -# PATCH /contactdb/segments/{segment_id} # +//////////////////////////////////////////////////////// +// Update a segment +// PATCH /contactdb/segments/{segment_id} string data = @"{ 'conditions': [ @@ -409,9 +409,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve a segment # -# GET /contactdb/segments/{segment_id} # +//////////////////////////////////////////////////////// +// Retrieve a segment +// GET /contactdb/segments/{segment_id} string queryParams = @"{ 'segment_id': 0 @@ -423,9 +423,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete a segment # -# DELETE /contactdb/segments/{segment_id} # +//////////////////////////////////////////////////////// +// Delete a segment +// DELETE /contactdb/segments/{segment_id} string queryParams = @"{ 'delete_contacts': 'true' @@ -437,9 +437,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve recipients on a segment # -# GET /contactdb/segments/{segment_id}/recipients # +//////////////////////////////////////////////////////// +// Retrieve recipients on a segment +// GET /contactdb/segments/{segment_id}/recipients string queryParams = @"{ 'page': 1, diff --git a/examples/devices/devices.cs b/examples/devices/devices.cs index 2e58403..e813871 100644 --- a/examples/devices/devices.cs +++ b/examples/devices/devices.cs @@ -5,9 +5,9 @@ using System.Collections.Generic; string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User); dynamic sg = new SendGrid.SendGridAPIClient(_apiKey); -################################################## -# Retrieve email statistics by device type. # -# GET /devices/stats # +//////////////////////////////////////////////////////// +// Retrieve email statistics by device type. +// GET /devices/stats string queryParams = @"{ 'aggregated_by': 'day', diff --git a/examples/geo/geo.cs b/examples/geo/geo.cs index 21268f4..25faa04 100644 --- a/examples/geo/geo.cs +++ b/examples/geo/geo.cs @@ -5,9 +5,9 @@ using System.Collections.Generic; string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User); dynamic sg = new SendGrid.SendGridAPIClient(_apiKey); -################################################## -# Retrieve email statistics by country and state/province. # -# GET /geo/stats # +//////////////////////////////////////////////////////// +// Retrieve email statistics by country and state/province. +// GET /geo/stats string queryParams = @"{ 'aggregated_by': 'day', diff --git a/examples/ips/ips.cs b/examples/ips/ips.cs index 077eedc..640da91 100644 --- a/examples/ips/ips.cs +++ b/examples/ips/ips.cs @@ -5,9 +5,9 @@ using System.Collections.Generic; string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User); dynamic sg = new SendGrid.SendGridAPIClient(_apiKey); -################################################## -# Retrieve all IP addresses # -# GET /ips # +//////////////////////////////////////////////////////// +// Retrieve all IP addresses +// GET /ips string queryParams = @"{ 'exclude_whitelabels': 'true', @@ -22,9 +22,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve all assigned IPs # -# GET /ips/assigned # +//////////////////////////////////////////////////////// +// Retrieve all assigned IPs +// GET /ips/assigned dynamic response = sg.client.ips.assigned.get(); Console.WriteLine(response.StatusCode); @@ -32,9 +32,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Create an IP pool. # -# POST /ips/pools # +//////////////////////////////////////////////////////// +// Create an IP pool. +// POST /ips/pools string data = @"{ 'name': 'marketing' @@ -45,9 +45,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve all IP pools. # -# GET /ips/pools # +//////////////////////////////////////////////////////// +// Retrieve all IP pools. +// GET /ips/pools dynamic response = sg.client.ips.pools.get(); Console.WriteLine(response.StatusCode); @@ -55,9 +55,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update an IP pools name. # -# PUT /ips/pools/{pool_name} # +//////////////////////////////////////////////////////// +// Update an IP pools name. +// PUT /ips/pools/{pool_name} string data = @"{ 'name': 'new_pool_name' @@ -69,9 +69,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve all IPs in a specified pool. # -# GET /ips/pools/{pool_name} # +//////////////////////////////////////////////////////// +// Retrieve all IPs in a specified pool. +// GET /ips/pools/{pool_name} var pool_name = "test_url_param"; dynamic response = sg.client.ips.pools._(pool_name).get(); @@ -80,9 +80,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete an IP pool. # -# DELETE /ips/pools/{pool_name} # +//////////////////////////////////////////////////////// +// Delete an IP pool. +// DELETE /ips/pools/{pool_name} var pool_name = "test_url_param"; dynamic response = sg.client.ips.pools._(pool_name).delete(); @@ -91,9 +91,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Add an IP address to a pool # -# POST /ips/pools/{pool_name}/ips # +//////////////////////////////////////////////////////// +// Add an IP address to a pool +// POST /ips/pools/{pool_name}/ips string data = @"{ 'ip': '0.0.0.0' @@ -105,9 +105,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Remove an IP address from a pool. # -# DELETE /ips/pools/{pool_name}/ips/{ip} # +//////////////////////////////////////////////////////// +// Remove an IP address from a pool. +// DELETE /ips/pools/{pool_name}/ips/{ip} var pool_name = "test_url_param"; var ip = "test_url_param"; @@ -117,9 +117,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Add an IP to warmup # -# POST /ips/warmup # +//////////////////////////////////////////////////////// +// Add an IP to warmup +// POST /ips/warmup string data = @"{ 'ip': '0.0.0.0' @@ -130,9 +130,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve all IPs currently in warmup # -# GET /ips/warmup # +//////////////////////////////////////////////////////// +// Retrieve all IPs currently in warmup +// GET /ips/warmup dynamic response = sg.client.ips.warmup.get(); Console.WriteLine(response.StatusCode); @@ -140,9 +140,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve warmup status for a specific IP address # -# GET /ips/warmup/{ip_address} # +//////////////////////////////////////////////////////// +// Retrieve warmup status for a specific IP address +// GET /ips/warmup/{ip_address} var ip_address = "test_url_param"; dynamic response = sg.client.ips.warmup._(ip_address).get(); @@ -151,9 +151,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Remove an IP from warmup # -# DELETE /ips/warmup/{ip_address} # +//////////////////////////////////////////////////////// +// Remove an IP from warmup +// DELETE /ips/warmup/{ip_address} var ip_address = "test_url_param"; dynamic response = sg.client.ips.warmup._(ip_address).delete(); @@ -162,9 +162,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve all IP pools an IP address belongs to # -# GET /ips/{ip_address} # +//////////////////////////////////////////////////////// +// Retrieve all IP pools an IP address belongs to +// GET /ips/{ip_address} var ip_address = "test_url_param"; dynamic response = sg.client.ips._(ip_address).get(); diff --git a/examples/mail/mail.cs b/examples/mail/mail.cs index 6ff86f9..0500958 100644 --- a/examples/mail/mail.cs +++ b/examples/mail/mail.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 batch ID # -# POST /mail/batch # +//////////////////////////////////////////////////////// +// Create a batch ID +// POST /mail/batch dynamic response = sg.client.mail.batch.post(); Console.WriteLine(response.StatusCode); @@ -15,9 +15,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Validate batch ID # -# GET /mail/batch/{batch_id} # +//////////////////////////////////////////////////////// +// Validate batch ID +// GET /mail/batch/{batch_id} var batch_id = "test_url_param"; dynamic response = sg.client.mail.batch._(batch_id).get(); @@ -26,9 +26,10 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# v3 Mail Send Beta # -# POST /mail/send/beta # +//////////////////////////////////////////////////////// +// v3 Mail Send Beta +// POST /mail/send/beta +# This endpoint has a helper, check it out [here](https://github.com/sendgrid/sendgrid-csharp/blob/v3beta/SendGrid/SendGrid/Helpers/Mail/README.md). string data = @"{ 'asm': { diff --git a/examples/mailboxproviders/mailboxproviders.cs b/examples/mailboxproviders/mailboxproviders.cs index f0af12a..b307fc4 100644 --- a/examples/mailboxproviders/mailboxproviders.cs +++ b/examples/mailboxproviders/mailboxproviders.cs @@ -5,9 +5,9 @@ using System.Collections.Generic; string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User); dynamic sg = new SendGrid.SendGridAPIClient(_apiKey); -################################################## -# Retrieve email statistics by mailbox provider. # -# GET /mailbox_providers/stats # +//////////////////////////////////////////////////////// +// Retrieve email statistics by mailbox provider. +// GET /mailbox_providers/stats string queryParams = @"{ 'aggregated_by': 'day', diff --git a/examples/mailsettings/mailsettings.cs b/examples/mailsettings/mailsettings.cs index 6af284f..8f0c519 100644 --- a/examples/mailsettings/mailsettings.cs +++ b/examples/mailsettings/mailsettings.cs @@ -5,9 +5,9 @@ using System.Collections.Generic; string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User); dynamic sg = new SendGrid.SendGridAPIClient(_apiKey); -################################################## -# Retrieve all mail settings # -# GET /mail_settings # +//////////////////////////////////////////////////////// +// Retrieve all mail settings +// GET /mail_settings string queryParams = @"{ 'limit': 1, @@ -19,9 +19,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update address whitelist mail settings # -# PATCH /mail_settings/address_whitelist # +//////////////////////////////////////////////////////// +// Update address whitelist mail settings +// PATCH /mail_settings/address_whitelist string data = @"{ 'enabled': true, @@ -36,9 +36,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve address whitelist mail settings # -# GET /mail_settings/address_whitelist # +//////////////////////////////////////////////////////// +// Retrieve address whitelist mail settings +// GET /mail_settings/address_whitelist dynamic response = sg.client.mail_settings.address_whitelist.get(); Console.WriteLine(response.StatusCode); @@ -46,9 +46,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update BCC mail settings # -# PATCH /mail_settings/bcc # +//////////////////////////////////////////////////////// +// Update BCC mail settings +// PATCH /mail_settings/bcc string data = @"{ 'email': 'email@example.com', @@ -60,9 +60,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve all BCC mail settings # -# GET /mail_settings/bcc # +//////////////////////////////////////////////////////// +// Retrieve all BCC mail settings +// GET /mail_settings/bcc dynamic response = sg.client.mail_settings.bcc.get(); Console.WriteLine(response.StatusCode); @@ -70,9 +70,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update bounce purge mail settings # -# PATCH /mail_settings/bounce_purge # +//////////////////////////////////////////////////////// +// Update bounce purge mail settings +// PATCH /mail_settings/bounce_purge string data = @"{ 'enabled': true, @@ -85,9 +85,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve bounce purge mail settings # -# GET /mail_settings/bounce_purge # +//////////////////////////////////////////////////////// +// Retrieve bounce purge mail settings +// GET /mail_settings/bounce_purge dynamic response = sg.client.mail_settings.bounce_purge.get(); Console.WriteLine(response.StatusCode); @@ -95,9 +95,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update footer mail settings # -# PATCH /mail_settings/footer # +//////////////////////////////////////////////////////// +// Update footer mail settings +// PATCH /mail_settings/footer string data = @"{ 'enabled': true, @@ -110,9 +110,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve footer mail settings # -# GET /mail_settings/footer # +//////////////////////////////////////////////////////// +// Retrieve footer mail settings +// GET /mail_settings/footer dynamic response = sg.client.mail_settings.footer.get(); Console.WriteLine(response.StatusCode); @@ -120,9 +120,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update forward bounce mail settings # -# PATCH /mail_settings/forward_bounce # +//////////////////////////////////////////////////////// +// Update forward bounce mail settings +// PATCH /mail_settings/forward_bounce string data = @"{ 'email': 'example@example.com', @@ -134,9 +134,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve forward bounce mail settings # -# GET /mail_settings/forward_bounce # +//////////////////////////////////////////////////////// +// Retrieve forward bounce mail settings +// GET /mail_settings/forward_bounce dynamic response = sg.client.mail_settings.forward_bounce.get(); Console.WriteLine(response.StatusCode); @@ -144,9 +144,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update forward spam mail settings # -# PATCH /mail_settings/forward_spam # +//////////////////////////////////////////////////////// +// Update forward spam mail settings +// PATCH /mail_settings/forward_spam string data = @"{ 'email': '', @@ -158,9 +158,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve forward spam mail settings # -# GET /mail_settings/forward_spam # +//////////////////////////////////////////////////////// +// Retrieve forward spam mail settings +// GET /mail_settings/forward_spam dynamic response = sg.client.mail_settings.forward_spam.get(); Console.WriteLine(response.StatusCode); @@ -168,9 +168,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update plain content mail settings # -# PATCH /mail_settings/plain_content # +//////////////////////////////////////////////////////// +// Update plain content mail settings +// PATCH /mail_settings/plain_content string data = @"{ 'enabled': false @@ -181,9 +181,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve plain content mail settings # -# GET /mail_settings/plain_content # +//////////////////////////////////////////////////////// +// Retrieve plain content mail settings +// GET /mail_settings/plain_content dynamic response = sg.client.mail_settings.plain_content.get(); Console.WriteLine(response.StatusCode); @@ -191,9 +191,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update spam check mail settings # -# PATCH /mail_settings/spam_check # +//////////////////////////////////////////////////////// +// Update spam check mail settings +// PATCH /mail_settings/spam_check string data = @"{ 'enabled': true, @@ -206,9 +206,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve spam check mail settings # -# GET /mail_settings/spam_check # +//////////////////////////////////////////////////////// +// Retrieve spam check mail settings +// GET /mail_settings/spam_check dynamic response = sg.client.mail_settings.spam_check.get(); Console.WriteLine(response.StatusCode); @@ -216,9 +216,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update template mail settings # -# PATCH /mail_settings/template # +//////////////////////////////////////////////////////// +// Update template mail settings +// PATCH /mail_settings/template string data = @"{ 'enabled': true, @@ -230,9 +230,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve legacy template mail settings # -# GET /mail_settings/template # +//////////////////////////////////////////////////////// +// Retrieve legacy template mail settings +// GET /mail_settings/template dynamic response = sg.client.mail_settings.template.get(); Console.WriteLine(response.StatusCode); diff --git a/examples/partnersettings/partnersettings.cs b/examples/partnersettings/partnersettings.cs index df30bc7..5f253b3 100644 --- a/examples/partnersettings/partnersettings.cs +++ b/examples/partnersettings/partnersettings.cs @@ -5,9 +5,9 @@ using System.Collections.Generic; string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User); dynamic sg = new SendGrid.SendGridAPIClient(_apiKey); -################################################## -# Returns a list of all partner settings. # -# GET /partner_settings # +//////////////////////////////////////////////////////// +// Returns a list of all partner settings. +// GET /partner_settings string queryParams = @"{ 'limit': 1, @@ -19,9 +19,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Updates New Relic partner settings. # -# PATCH /partner_settings/new_relic # +//////////////////////////////////////////////////////// +// Updates New Relic partner settings. +// PATCH /partner_settings/new_relic string data = @"{ 'enable_subuser_statistics': true, @@ -34,9 +34,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Returns all New Relic partner settings. # -# GET /partner_settings/new_relic # +//////////////////////////////////////////////////////// +// Returns all New Relic partner settings. +// GET /partner_settings/new_relic dynamic response = sg.client.partner_settings.new_relic.get(); Console.WriteLine(response.StatusCode); diff --git a/examples/scopes/scopes.cs b/examples/scopes/scopes.cs index 05191af..c5a5c68 100644 --- a/examples/scopes/scopes.cs +++ b/examples/scopes/scopes.cs @@ -5,9 +5,9 @@ using System.Collections.Generic; string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User); dynamic sg = new SendGrid.SendGridAPIClient(_apiKey); -################################################## -# Retrieve a list of scopes for which this user has access. # -# GET /scopes # +//////////////////////////////////////////////////////// +// Retrieve a list of scopes for which this user has access. +// GET /scopes dynamic response = sg.client.scopes.get(); Console.WriteLine(response.StatusCode); diff --git a/examples/stats/stats.cs b/examples/stats/stats.cs index b608bee..a363952 100644 --- a/examples/stats/stats.cs +++ b/examples/stats/stats.cs @@ -5,9 +5,9 @@ using System.Collections.Generic; string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User); dynamic sg = new SendGrid.SendGridAPIClient(_apiKey); -################################################## -# Retrieve global email statistics # -# GET /stats # +//////////////////////////////////////////////////////// +// Retrieve global email statistics +// GET /stats string queryParams = @"{ 'aggregated_by': 'day', 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', diff --git a/examples/suppression/suppression.cs b/examples/suppression/suppression.cs index 7a07513..6cd819a 100644 --- a/examples/suppression/suppression.cs +++ b/examples/suppression/suppression.cs @@ -5,9 +5,9 @@ using System.Collections.Generic; string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User); dynamic sg = new SendGrid.SendGridAPIClient(_apiKey); -################################################## -# Retrieve all blocks # -# GET /suppression/blocks # +//////////////////////////////////////////////////////// +// Retrieve all blocks +// GET /suppression/blocks string queryParams = @"{ 'end_time': 1, @@ -21,9 +21,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete blocks # -# DELETE /suppression/blocks # +//////////////////////////////////////////////////////// +// Delete blocks +// DELETE /suppression/blocks string data = @"{ 'delete_all': false, @@ -38,9 +38,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve a specific block # -# GET /suppression/blocks/{email} # +//////////////////////////////////////////////////////// +// Retrieve a specific block +// GET /suppression/blocks/{email} var email = "test_url_param"; dynamic response = sg.client.suppression.blocks._(email).get(); @@ -49,9 +49,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete a specific block # -# DELETE /suppression/blocks/{email} # +//////////////////////////////////////////////////////// +// Delete a specific block +// DELETE /suppression/blocks/{email} var email = "test_url_param"; dynamic response = sg.client.suppression.blocks._(email).delete(); @@ -60,9 +60,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve all bounces # -# GET /suppression/bounces # +//////////////////////////////////////////////////////// +// Retrieve all bounces +// GET /suppression/bounces string queryParams = @"{ 'end_time': 0, @@ -74,9 +74,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete bounces # -# DELETE /suppression/bounces # +//////////////////////////////////////////////////////// +// Delete bounces +// DELETE /suppression/bounces string data = @"{ 'delete_all': true, @@ -91,9 +91,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve a Bounce # -# GET /suppression/bounces/{email} # +//////////////////////////////////////////////////////// +// Retrieve a Bounce +// GET /suppression/bounces/{email} var email = "test_url_param"; dynamic response = sg.client.suppression.bounces._(email).get(); @@ -102,9 +102,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete a bounce # -# DELETE /suppression/bounces/{email} # +//////////////////////////////////////////////////////// +// Delete a bounce +// DELETE /suppression/bounces/{email} string queryParams = @"{ 'email_address': 'example@example.com' @@ -116,9 +116,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve all invalid emails # -# GET /suppression/invalid_emails # +//////////////////////////////////////////////////////// +// Retrieve all invalid emails +// GET /suppression/invalid_emails string queryParams = @"{ 'end_time': 1, @@ -132,9 +132,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete invalid emails # -# DELETE /suppression/invalid_emails # +//////////////////////////////////////////////////////// +// Delete invalid emails +// DELETE /suppression/invalid_emails string data = @"{ 'delete_all': false, @@ -149,9 +149,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve a specific invalid email # -# GET /suppression/invalid_emails/{email} # +//////////////////////////////////////////////////////// +// Retrieve a specific invalid email +// GET /suppression/invalid_emails/{email} var email = "test_url_param"; dynamic response = sg.client.suppression.invalid_emails._(email).get(); @@ -160,9 +160,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete a specific invalid email # -# DELETE /suppression/invalid_emails/{email} # +//////////////////////////////////////////////////////// +// Delete a specific invalid email +// DELETE /suppression/invalid_emails/{email} var email = "test_url_param"; dynamic response = sg.client.suppression.invalid_emails._(email).delete(); @@ -171,9 +171,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve a specific spam report # -# GET /suppression/spam_report/{email} # +//////////////////////////////////////////////////////// +// Retrieve a specific spam report +// GET /suppression/spam_report/{email} var email = "test_url_param"; dynamic response = sg.client.suppression.spam_report._(email).get(); @@ -182,9 +182,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete a specific spam report # -# DELETE /suppression/spam_report/{email} # +//////////////////////////////////////////////////////// +// Delete a specific spam report +// DELETE /suppression/spam_report/{email} var email = "test_url_param"; dynamic response = sg.client.suppression.spam_report._(email).delete(); @@ -193,9 +193,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve all spam reports # -# GET /suppression/spam_reports # +//////////////////////////////////////////////////////// +// Retrieve all spam reports +// GET /suppression/spam_reports string queryParams = @"{ 'end_time': 1, @@ -209,9 +209,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete spam reports # -# DELETE /suppression/spam_reports # +//////////////////////////////////////////////////////// +// Delete spam reports +// DELETE /suppression/spam_reports string data = @"{ 'delete_all': false, @@ -226,9 +226,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve all global suppressions # -# GET /suppression/unsubscribes # +//////////////////////////////////////////////////////// +// Retrieve all global suppressions +// GET /suppression/unsubscribes string queryParams = @"{ 'end_time': 1, 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"; diff --git a/examples/trackingsettings/trackingsettings.cs b/examples/trackingsettings/trackingsettings.cs index c6a0eb1..cba044d 100644 --- a/examples/trackingsettings/trackingsettings.cs +++ b/examples/trackingsettings/trackingsettings.cs @@ -5,9 +5,9 @@ using System.Collections.Generic; string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User); dynamic sg = new SendGrid.SendGridAPIClient(_apiKey); -################################################## -# Retrieve Tracking Settings # -# GET /tracking_settings # +//////////////////////////////////////////////////////// +// Retrieve Tracking Settings +// GET /tracking_settings string queryParams = @"{ 'limit': 1, @@ -19,9 +19,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update Click Tracking Settings # -# PATCH /tracking_settings/click # +//////////////////////////////////////////////////////// +// Update Click Tracking Settings +// PATCH /tracking_settings/click string data = @"{ 'enabled': true @@ -32,9 +32,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve Click Track Settings # -# GET /tracking_settings/click # +//////////////////////////////////////////////////////// +// Retrieve Click Track Settings +// GET /tracking_settings/click dynamic response = sg.client.tracking_settings.click.get(); Console.WriteLine(response.StatusCode); @@ -42,9 +42,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update Google Analytics Settings # -# PATCH /tracking_settings/google_analytics # +//////////////////////////////////////////////////////// +// Update Google Analytics Settings +// PATCH /tracking_settings/google_analytics string data = @"{ 'enabled': true, @@ -60,9 +60,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve Google Analytics Settings # -# GET /tracking_settings/google_analytics # +//////////////////////////////////////////////////////// +// Retrieve Google Analytics Settings +// GET /tracking_settings/google_analytics dynamic response = sg.client.tracking_settings.google_analytics.get(); Console.WriteLine(response.StatusCode); @@ -70,9 +70,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update Open Tracking Settings # -# PATCH /tracking_settings/open # +//////////////////////////////////////////////////////// +// Update Open Tracking Settings +// PATCH /tracking_settings/open string data = @"{ 'enabled': true @@ -83,9 +83,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Get Open Tracking Settings # -# GET /tracking_settings/open # +//////////////////////////////////////////////////////// +// Get Open Tracking Settings +// GET /tracking_settings/open dynamic response = sg.client.tracking_settings.open.get(); Console.WriteLine(response.StatusCode); @@ -93,9 +93,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update Subscription Tracking Settings # -# PATCH /tracking_settings/subscription # +//////////////////////////////////////////////////////// +// Update Subscription Tracking Settings +// PATCH /tracking_settings/subscription string data = @"{ 'enabled': true, @@ -111,9 +111,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve Subscription Tracking Settings # -# GET /tracking_settings/subscription # +//////////////////////////////////////////////////////// +// Retrieve Subscription Tracking Settings +// GET /tracking_settings/subscription dynamic response = sg.client.tracking_settings.subscription.get(); Console.WriteLine(response.StatusCode); diff --git a/examples/user/user.cs b/examples/user/user.cs index e57a8c9..c81acc6 100644 --- a/examples/user/user.cs +++ b/examples/user/user.cs @@ -5,9 +5,9 @@ using System.Collections.Generic; string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User); dynamic sg = new SendGrid.SendGridAPIClient(_apiKey); -################################################## -# Get a user's account information. # -# GET /user/account # +//////////////////////////////////////////////////////// +// Get a user's account information. +// GET /user/account dynamic response = sg.client.user.account.get(); Console.WriteLine(response.StatusCode); @@ -15,9 +15,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve your credit balance # -# GET /user/credits # +//////////////////////////////////////////////////////// +// Retrieve your credit balance +// GET /user/credits dynamic response = sg.client.user.credits.get(); Console.WriteLine(response.StatusCode); @@ -25,9 +25,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update your account email address # -# PUT /user/email # +//////////////////////////////////////////////////////// +// Update your account email address +// PUT /user/email string data = @"{ 'email': 'example@example.com' @@ -38,9 +38,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve your account email address # -# GET /user/email # +//////////////////////////////////////////////////////// +// Retrieve your account email address +// GET /user/email dynamic response = sg.client.user.email.get(); Console.WriteLine(response.StatusCode); @@ -48,9 +48,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update your password # -# PUT /user/password # +//////////////////////////////////////////////////////// +// Update your password +// PUT /user/password string data = @"{ 'new_password': 'new_password', @@ -62,9 +62,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update a user's profile # -# PATCH /user/profile # +//////////////////////////////////////////////////////// +// Update a user's profile +// PATCH /user/profile string data = @"{ 'city': 'Orange', @@ -77,9 +77,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Get a user's profile # -# GET /user/profile # +//////////////////////////////////////////////////////// +// Get a user's profile +// GET /user/profile dynamic response = sg.client.user.profile.get(); Console.WriteLine(response.StatusCode); @@ -87,9 +87,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Cancel or pause a scheduled send # -# POST /user/scheduled_sends # +//////////////////////////////////////////////////////// +// Cancel or pause a scheduled send +// POST /user/scheduled_sends string data = @"{ 'batch_id': 'YOUR_BATCH_ID', @@ -101,9 +101,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve all scheduled sends # -# GET /user/scheduled_sends # +//////////////////////////////////////////////////////// +// Retrieve all scheduled sends +// GET /user/scheduled_sends dynamic response = sg.client.user.scheduled_sends.get(); Console.WriteLine(response.StatusCode); @@ -111,9 +111,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update user scheduled send information # -# PATCH /user/scheduled_sends/{batch_id} # +//////////////////////////////////////////////////////// +// Update user scheduled send information +// PATCH /user/scheduled_sends/{batch_id} string data = @"{ 'status': 'pause' @@ -125,9 +125,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve scheduled send # -# GET /user/scheduled_sends/{batch_id} # +//////////////////////////////////////////////////////// +// Retrieve scheduled send +// GET /user/scheduled_sends/{batch_id} var batch_id = "test_url_param"; dynamic response = sg.client.user.scheduled_sends._(batch_id).get(); @@ -136,9 +136,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete a cancellation or pause of a scheduled send # -# DELETE /user/scheduled_sends/{batch_id} # +//////////////////////////////////////////////////////// +// Delete a cancellation or pause of a scheduled send +// DELETE /user/scheduled_sends/{batch_id} var batch_id = "test_url_param"; dynamic response = sg.client.user.scheduled_sends._(batch_id).delete(); @@ -147,9 +147,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update Enforced TLS settings # -# PATCH /user/settings/enforced_tls # +//////////////////////////////////////////////////////// +// Update Enforced TLS settings +// PATCH /user/settings/enforced_tls string data = @"{ 'require_tls': true, @@ -161,9 +161,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve current Enforced TLS settings. # -# GET /user/settings/enforced_tls # +//////////////////////////////////////////////////////// +// Retrieve current Enforced TLS settings. +// GET /user/settings/enforced_tls dynamic response = sg.client.user.settings.enforced_tls.get(); Console.WriteLine(response.StatusCode); @@ -171,9 +171,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update your username # -# PUT /user/username # +//////////////////////////////////////////////////////// +// Update your username +// PUT /user/username string data = @"{ 'username': 'test_username' @@ -184,9 +184,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve your username # -# GET /user/username # +//////////////////////////////////////////////////////// +// Retrieve your username +// GET /user/username dynamic response = sg.client.user.username.get(); Console.WriteLine(response.StatusCode); @@ -194,9 +194,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update Event Notification Settings # -# PATCH /user/webhooks/event/settings # +//////////////////////////////////////////////////////// +// Update Event Notification Settings +// PATCH /user/webhooks/event/settings string data = @"{ 'bounce': true, @@ -219,9 +219,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve Event Webhook settings # -# GET /user/webhooks/event/settings # +//////////////////////////////////////////////////////// +// Retrieve Event Webhook settings +// GET /user/webhooks/event/settings dynamic response = sg.client.user.webhooks._("event").settings.get(); Console.WriteLine(response.StatusCode); @@ -229,9 +229,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Test Event Notification Settings # -# POST /user/webhooks/event/test # +//////////////////////////////////////////////////////// +// Test Event Notification Settings +// POST /user/webhooks/event/test string data = @"{ 'url': 'url' @@ -242,9 +242,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve Parse Webhook settings # -# GET /user/webhooks/parse/settings # +//////////////////////////////////////////////////////// +// Retrieve Parse Webhook settings +// GET /user/webhooks/parse/settings dynamic response = sg.client.user.webhooks.parse.settings.get(); Console.WriteLine(response.StatusCode); @@ -252,9 +252,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieves Inbound Parse Webhook statistics. # -# GET /user/webhooks/parse/stats # +//////////////////////////////////////////////////////// +// Retrieves Inbound Parse Webhook statistics. +// GET /user/webhooks/parse/stats string queryParams = @"{ 'aggregated_by': 'day', diff --git a/examples/whitelabel/whitelabel.cs b/examples/whitelabel/whitelabel.cs index 8d4905e..80be1c1 100644 --- a/examples/whitelabel/whitelabel.cs +++ b/examples/whitelabel/whitelabel.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 domain whitelabel. # -# POST /whitelabel/domains # +//////////////////////////////////////////////////////// +// Create a domain whitelabel. +// POST /whitelabel/domains string data = @"{ 'automatic_security': false, @@ -27,9 +27,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# List all domain whitelabels. # -# GET /whitelabel/domains # +//////////////////////////////////////////////////////// +// List all domain whitelabels. +// GET /whitelabel/domains string queryParams = @"{ 'domain': 'test_string', @@ -44,9 +44,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Get the default domain whitelabel. # -# GET /whitelabel/domains/default # +//////////////////////////////////////////////////////// +// Get the default domain whitelabel. +// GET /whitelabel/domains/default dynamic response = sg.client.whitelabel.domains._("default").get(); Console.WriteLine(response.StatusCode); @@ -54,9 +54,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# List the domain whitelabel associated with the given user. # -# GET /whitelabel/domains/subuser # +//////////////////////////////////////////////////////// +// List the domain whitelabel associated with the given user. +// GET /whitelabel/domains/subuser dynamic response = sg.client.whitelabel.domains.subuser.get(); Console.WriteLine(response.StatusCode); @@ -64,9 +64,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Disassociate a domain whitelabel from a given user. # -# DELETE /whitelabel/domains/subuser # +//////////////////////////////////////////////////////// +// Disassociate a domain whitelabel from a given user. +// DELETE /whitelabel/domains/subuser dynamic response = sg.client.whitelabel.domains.subuser.delete(); Console.WriteLine(response.StatusCode); @@ -74,9 +74,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update a domain whitelabel. # -# PATCH /whitelabel/domains/{domain_id} # +//////////////////////////////////////////////////////// +// Update a domain whitelabel. +// PATCH /whitelabel/domains/{domain_id} string data = @"{ 'custom_spf': true, @@ -89,9 +89,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve a domain whitelabel. # -# GET /whitelabel/domains/{domain_id} # +//////////////////////////////////////////////////////// +// Retrieve a domain whitelabel. +// GET /whitelabel/domains/{domain_id} var domain_id = "test_url_param"; dynamic response = sg.client.whitelabel.domains._(domain_id).get(); @@ -100,9 +100,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete a domain whitelabel. # -# DELETE /whitelabel/domains/{domain_id} # +//////////////////////////////////////////////////////// +// Delete a domain whitelabel. +// DELETE /whitelabel/domains/{domain_id} var domain_id = "test_url_param"; dynamic response = sg.client.whitelabel.domains._(domain_id).delete(); @@ -111,9 +111,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Associate a domain whitelabel with a given user. # -# POST /whitelabel/domains/{domain_id}/subuser # +//////////////////////////////////////////////////////// +// Associate a domain whitelabel with a given user. +// POST /whitelabel/domains/{domain_id}/subuser string data = @"{ 'username': 'jane@example.com' @@ -125,9 +125,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Add an IP to a domain whitelabel. # -# POST /whitelabel/domains/{id}/ips # +//////////////////////////////////////////////////////// +// Add an IP to a domain whitelabel. +// POST /whitelabel/domains/{id}/ips string data = @"{ 'ip': '192.168.0.1' @@ -139,9 +139,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Remove an IP from a domain whitelabel. # -# DELETE /whitelabel/domains/{id}/ips/{ip} # +//////////////////////////////////////////////////////// +// Remove an IP from a domain whitelabel. +// DELETE /whitelabel/domains/{id}/ips/{ip} var id = "test_url_param"; var ip = "test_url_param"; @@ -151,9 +151,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Validate a domain whitelabel. # -# POST /whitelabel/domains/{id}/validate # +//////////////////////////////////////////////////////// +// Validate a domain whitelabel. +// POST /whitelabel/domains/{id}/validate var id = "test_url_param"; dynamic response = sg.client.whitelabel.domains._(id).validate.post(); @@ -162,9 +162,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Create an IP whitelabel # -# POST /whitelabel/ips # +//////////////////////////////////////////////////////// +// Create an IP whitelabel +// POST /whitelabel/ips string data = @"{ 'domain': 'example.com', @@ -177,9 +177,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve all IP whitelabels # -# GET /whitelabel/ips # +//////////////////////////////////////////////////////// +// Retrieve all IP whitelabels +// GET /whitelabel/ips string queryParams = @"{ 'ip': 'test_string', @@ -192,9 +192,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve an IP whitelabel # -# GET /whitelabel/ips/{id} # +//////////////////////////////////////////////////////// +// Retrieve an IP whitelabel +// GET /whitelabel/ips/{id} var id = "test_url_param"; dynamic response = sg.client.whitelabel.ips._(id).get(); @@ -203,9 +203,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete an IP whitelabel # -# DELETE /whitelabel/ips/{id} # +//////////////////////////////////////////////////////// +// Delete an IP whitelabel +// DELETE /whitelabel/ips/{id} var id = "test_url_param"; dynamic response = sg.client.whitelabel.ips._(id).delete(); @@ -214,9 +214,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Validate an IP whitelabel # -# POST /whitelabel/ips/{id}/validate # +//////////////////////////////////////////////////////// +// Validate an IP whitelabel +// POST /whitelabel/ips/{id}/validate var id = "test_url_param"; dynamic response = sg.client.whitelabel.ips._(id).validate.post(); @@ -225,9 +225,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Create a Link Whitelabel # -# POST /whitelabel/links # +//////////////////////////////////////////////////////// +// Create a Link Whitelabel +// POST /whitelabel/links string data = @"{ 'default': true, @@ -244,9 +244,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve all link whitelabels # -# GET /whitelabel/links # +//////////////////////////////////////////////////////// +// Retrieve all link whitelabels +// GET /whitelabel/links string queryParams = @"{ 'limit': 1 @@ -257,9 +257,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve a Default Link Whitelabel # -# GET /whitelabel/links/default # +//////////////////////////////////////////////////////// +// Retrieve a Default Link Whitelabel +// GET /whitelabel/links/default string queryParams = @"{ 'domain': 'test_string' @@ -270,9 +270,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve Associated Link Whitelabel # -# GET /whitelabel/links/subuser # +//////////////////////////////////////////////////////// +// Retrieve Associated Link Whitelabel +// GET /whitelabel/links/subuser string queryParams = @"{ 'username': 'test_string' @@ -283,9 +283,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Disassociate a Link Whitelabel # -# DELETE /whitelabel/links/subuser # +//////////////////////////////////////////////////////// +// Disassociate a Link Whitelabel +// DELETE /whitelabel/links/subuser string queryParams = @"{ 'username': 'test_string' @@ -296,9 +296,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Update a Link Whitelabel # -# PATCH /whitelabel/links/{id} # +//////////////////////////////////////////////////////// +// Update a Link Whitelabel +// PATCH /whitelabel/links/{id} string data = @"{ 'default': true @@ -310,9 +310,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Retrieve a Link Whitelabel # -# GET /whitelabel/links/{id} # +//////////////////////////////////////////////////////// +// Retrieve a Link Whitelabel +// GET /whitelabel/links/{id} var id = "test_url_param"; dynamic response = sg.client.whitelabel.links._(id).get(); @@ -321,9 +321,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Delete a Link Whitelabel # -# DELETE /whitelabel/links/{id} # +//////////////////////////////////////////////////////// +// Delete a Link Whitelabel +// DELETE /whitelabel/links/{id} var id = "test_url_param"; dynamic response = sg.client.whitelabel.links._(id).delete(); @@ -332,9 +332,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Validate a Link Whitelabel # -# POST /whitelabel/links/{id}/validate # +//////////////////////////////////////////////////////// +// Validate a Link Whitelabel +// POST /whitelabel/links/{id}/validate var id = "test_url_param"; dynamic response = sg.client.whitelabel.links._(id).validate.post(); @@ -343,9 +343,9 @@ Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); Console.ReadLine(); -################################################## -# Associate a Link Whitelabel # -# POST /whitelabel/links/{link_id}/subuser # +//////////////////////////////////////////////////////// +// Associate a Link Whitelabel +// POST /whitelabel/links/{link_id}/subuser string data = @"{ 'username': 'jane@example.com' |