Skip to content

Commit 6432c3c

Browse files
Updating usage docs and examples based on testing against deployed Nuget
1 parent e9dfa87 commit 6432c3c

File tree

25 files changed

+70
-93
lines changed

25 files changed

+70
-93
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Add the following namespaces to use the library:
4646
using System;
4747
using System.Web.Script.Serialization;
4848
using SendGrid;
49+
using SendGrid.Helpers.Mail; // Include if you want to use the Mail Helper
4950
```
5051

5152
## Dependencies
@@ -60,6 +61,7 @@ using SendGrid;
6061
```csharp
6162
using System;
6263
using SendGrid;
64+
using SendGrid.Helpers.Mail;
6365

6466
namespace Example
6567
{
@@ -68,7 +70,7 @@ namespace Example
6870
private static void Main()
6971
{
7072
String apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
71-
dynamic sg = new SendGrid.SendGridAPIClient(apiKey);
73+
dynamic sg = new SendGridAPIClient(apiKey);
7274

7375
Email from = new Email("[email protected]");
7476
String subject = "Hello World from the SendGrid CSharp Library";
@@ -86,7 +88,6 @@ namespace Example
8688

8789
```csharp
8890
using System;
89-
using SendGrid;
9091

9192
namespace Example
9293
{
@@ -96,7 +97,7 @@ namespace Example
9697
{
9798
String apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
9899
dynamic sg = new SendGrid.SendGridAPIClient(apiKey);
99-
dynamic response = sg.client.api_keys.get(queryParams: queryParams);
100+
dynamic response = sg.client.api_keys.get();
100101
}
101102
}
102103
}

USAGE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ This documentation is based on our [OAI specification](https://github.com/sendgr
44

55
```csharp
66
using System;
7-
using SendGrid.Helpers.Mail;
8-
using System.Collections.Generic;
7+
using SendGrid.Helpers.Mail; // If you are using the Mail Helper
98
109
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
1110
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);

examples/accesssettings/accesssettings.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System;
2-
using SendGrid.Helpers.Mail;
3-
using System.Collections.Generic;
2+
using SendGrid.Helpers.Mail; // If you are using the Mail Helper
43

54
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
65
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);

examples/apikeys/apikeys.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System;
2-
using SendGrid.Helpers.Mail;
3-
using System.Collections.Generic;
2+
using SendGrid.Helpers.Mail; // If you are using the Mail Helper
43

54
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
65
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);

examples/asm/asm.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System;
2-
using SendGrid.Helpers.Mail;
3-
using System.Collections.Generic;
2+
using SendGrid.Helpers.Mail; // If you are using the Mail Helper
43

54
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
65
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);

examples/browsers/browsers.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System;
2-
using SendGrid.Helpers.Mail;
3-
using System.Collections.Generic;
2+
using SendGrid.Helpers.Mail; // If you are using the Mail Helper
43

54
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
65
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);

examples/campaigns/campaigns.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System;
2-
using SendGrid.Helpers.Mail;
3-
using System.Collections.Generic;
2+
using SendGrid.Helpers.Mail; // If you are using the Mail Helper
43

54
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
65
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);

examples/categories/categories.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System;
2-
using SendGrid.Helpers.Mail;
3-
using System.Collections.Generic;
2+
using SendGrid.Helpers.Mail; // If you are using the Mail Helper
43

54
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
65
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);

examples/clients/clients.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System;
2-
using SendGrid.Helpers.Mail;
3-
using System.Collections.Generic;
2+
using SendGrid.Helpers.Mail; // If you are using the Mail Helper
43

54
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
65
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);

examples/contactdb/contactdb.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System;
2-
using SendGrid.Helpers.Mail;
3-
using System.Collections.Generic;
2+
using SendGrid.Helpers.Mail; // If you are using the Mail Helper
43

54
string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
65
dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);

0 commit comments

Comments
 (0)