summaryrefslogtreecommitdiffstats
path: root/SendGrid/Example
diff options
context:
space:
mode:
authorTyler Bischel <tyler.bischel@sendgrid.com>2012-01-24 14:57:47 -0800
committerTyler Bischel <tyler.bischel@sendgrid.com>2012-01-24 14:57:47 -0800
commit1be4549531d73cf89b4bebd2dac003937a1661df (patch)
tree0e2f7611e7df1fd92cdb3cd573ece56c6a846e06 /SendGrid/Example
parentcc9ec168b75ef7ac492996c7d24eeb1177b02476 (diff)
downloadsendgrid-csharp-1be4549531d73cf89b4bebd2dac003937a1661df.zip
sendgrid-csharp-1be4549531d73cf89b4bebd2dac003937a1661df.tar.gz
sendgrid-csharp-1be4549531d73cf89b4bebd2dac003937a1661df.tar.bz2
renamed REST transport to Web
Diffstat (limited to 'SendGrid/Example')
-rwxr-xr-xSendGrid/Example/Example.csproj2
-rwxr-xr-xSendGrid/Example/Program.cs6
-rwxr-xr-xSendGrid/Example/WEBAPI.cs (renamed from SendGrid/Example/RESTAPI.cs)48
3 files changed, 28 insertions, 28 deletions
diff --git a/SendGrid/Example/Example.csproj b/SendGrid/Example/Example.csproj
index cb778d1..1f85cc2 100755
--- a/SendGrid/Example/Example.csproj
+++ b/SendGrid/Example/Example.csproj
@@ -47,7 +47,7 @@
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="RESTAPI.cs" />
+ <Compile Include="WEBAPI.cs" />
<Compile Include="SMTPAPI.cs" />
</ItemGroup>
<ItemGroup>
diff --git a/SendGrid/Example/Program.cs b/SendGrid/Example/Program.cs
index c1815b7..a429510 100755
--- a/SendGrid/Example/Program.cs
+++ b/SendGrid/Example/Program.cs
@@ -19,14 +19,14 @@ namespace Example
var from = "cj.buchmann@sendgrid.com";
var to = new List<String>
{
- "cj.buchmann@sendgrid.com"
+ "foo@bar.com"
};
//initialize the SMTPAPI example class
var smtpapi = new SMTPAPI(username, password, from, to);
- var restapi = new RESTAPI(username, password, from, to);
+ var restapi = new WEBAPI(username, password, from, to);
- //use this section to test out our REST and SMTP examples!
+ //use this section to test out our Web and SMTP examples!
restapi.EnableTemplateEmail();
Console.WriteLine("Done!");
diff --git a/SendGrid/Example/RESTAPI.cs b/SendGrid/Example/WEBAPI.cs
index 8c15800..adfd756 100755
--- a/SendGrid/Example/RESTAPI.cs
+++ b/SendGrid/Example/WEBAPI.cs
@@ -8,14 +8,14 @@ using SendGridMail.Transport;
namespace Example
{
- class RESTAPI
+ class WEBAPI
{
private String _username;
private String _password;
private String _from;
private IEnumerable<String> _to;
- public RESTAPI(String username, String password, String from, IEnumerable<String> recipients)
+ public WEBAPI(String username, String password, String from, IEnumerable<String> recipients)
{
_username = username;
_password = password;
@@ -46,8 +46,8 @@ namespace Example
//set the message subject
message.Subject = "Hello World HTML Test";
- //create an instance of the REST transport mechanism
- var transportInstance = REST.GetInstance(new NetworkCredential(_username, _password));
+ //create an instance of the Web transport mechanism
+ var transportInstance = Web.GetInstance(new NetworkCredential(_username, _password));
//send the mail
transportInstance.Deliver(message);
@@ -76,8 +76,8 @@ namespace Example
//set the message subject
message.Subject = "Hello World Plain Text Test";
- //create an instance of the REST transport mechanism
- var transportInstance = REST.GetInstance(new NetworkCredential(_username, _password));
+ //create an instance of the Web transport mechanism
+ var transportInstance = Web.GetInstance(new NetworkCredential(_username, _password));
//send the mail
transportInstance.Deliver(message);
@@ -108,8 +108,8 @@ namespace Example
//set the message subject
message.Subject = "Hello World Gravatar Test";
- //create an instance of the REST transport mechanism
- var transportInstance = REST.GetInstance(new NetworkCredential(_username, _password));
+ //create an instance of the Web transport mechanism
+ var transportInstance = Web.GetInstance(new NetworkCredential(_username, _password));
//enable gravatar
message.EnableGravatar();
@@ -142,8 +142,8 @@ namespace Example
//set the message subject
message.Subject = "Hello World Open Tracking Test";
- //create an instance of the REST transport mechanism
- var transportInstance = REST.GetInstance(new NetworkCredential(_username, _password));
+ //create an instance of the Web transport mechanism
+ var transportInstance = Web.GetInstance(new NetworkCredential(_username, _password));
//enable gravatar
message.EnableOpenTracking();
@@ -181,8 +181,8 @@ namespace Example
//set the message subject
message.Subject = "Hello World Click Tracking Test";
- //create an instance of the REST transport mechanism
- var transportInstance = REST.GetInstance(new NetworkCredential(_username, _password));
+ //create an instance of the Web transport mechanism
+ var transportInstance = Web.GetInstance(new NetworkCredential(_username, _password));
//enable clicktracking
message.EnableClickTracking(false);
@@ -218,8 +218,8 @@ namespace Example
//set the message subject
message.Subject = "WIN A MILLION DOLLARS TODAY! WORK FROM HOME! A NIGERIAN PRINCE WANTS YOU!";
- //create an instance of the REST transport mechanism
- var transportInstance = REST.GetInstance(new NetworkCredential(_username, _password));
+ //create an instance of the Web transport mechanism
+ var transportInstance = Web.GetInstance(new NetworkCredential(_username, _password));
//enable spamcheck
message.EnableSpamCheck();
@@ -255,8 +255,8 @@ namespace Example
//set the message subject
message.Subject = "Hello World Unsubscribe Test";
- //create an instance of the REST transport mechanism
- var transportInstance = REST.GetInstance(new NetworkCredential(_username, _password));
+ //create an instance of the Web transport mechanism
+ var transportInstance = Web.GetInstance(new NetworkCredential(_username, _password));
//enable spamcheck
//or optionally, you can specify 'replace' instead of the text and html in order to
@@ -295,8 +295,8 @@ namespace Example
//set the message subject
message.Subject = "Hello World Footer Test";
- //create an instance of the REST transport mechanism
- var transportInstance = REST.GetInstance(new NetworkCredential(_username, _password));
+ //create an instance of the Web transport mechanism
+ var transportInstance = Web.GetInstance(new NetworkCredential(_username, _password));
//Enable Footer
message.EnableFooter("PLAIN TEXT FOOTER", "<p color='blue'>HTML FOOTER TEXT</p>");
@@ -334,8 +334,8 @@ namespace Example
//set the message subject
message.Subject = "Hello World Footer Test";
- //create an instance of the REST transport mechanism
- var transportInstance = REST.GetInstance(new NetworkCredential(_username, _password));
+ //create an instance of the Web transport mechanism
+ var transportInstance = Web.GetInstance(new NetworkCredential(_username, _password));
//enable Google Analytics
message.EnableGoogleAnalytics("SendGridTest", "EMAIL", "Sendgrid", "ad-one", "My SG Campaign");
@@ -373,8 +373,8 @@ namespace Example
//set the message subject
message.Subject = "Hello World Template Test";
- //create an instance of the REST transport mechanism
- var transportInstance = REST.GetInstance(new NetworkCredential(_username, _password));
+ //create an instance of the Web transport mechanism
+ var transportInstance = Web.GetInstance(new NetworkCredential(_username, _password));
//enable template
message.EnableTemplate("<p>My Email Template <% body %> is awesome!</p>");
@@ -412,8 +412,8 @@ namespace Example
//set the message subject
message.Subject = "Hello World Bypass List Management Test";
- //create an instance of the REST transport mechanism
- var transportInstance = REST.GetInstance(new NetworkCredential(_username, _password));
+ //create an instance of the Web transport mechanism
+ var transportInstance = Web.GetInstance(new NetworkCredential(_username, _password));
//enable bypass list management
message.EnableBypassListManagement();