summaryrefslogtreecommitdiffstats
path: root/examples/scopes
diff options
context:
space:
mode:
authorElmer Thomas <elmer@thinkingserious.com>2016-06-14 10:22:39 -0700
committerElmer Thomas <elmer@thinkingserious.com>2016-06-14 10:22:39 -0700
commit1e2111f09142552d7dde4e18f116835dec91ed86 (patch)
tree1de111c549454450ce5a45aa129726132db217b5 /examples/scopes
parent5ee89f857c09d79e507483bd807727bb6c4d7057 (diff)
parent2e52cfb07decb924a961b5c75ece1b9e79ab973c (diff)
downloadsendgrid-csharp-7.0.1.zip
sendgrid-csharp-7.0.1.tar.gz
sendgrid-csharp-7.0.1.tar.bz2
Merge branch 'v3release'v7.0.1v7.0.0
Diffstat (limited to 'examples/scopes')
-rw-r--r--examples/scopes/scopes.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/examples/scopes/scopes.cs b/examples/scopes/scopes.cs
new file mode 100644
index 0000000..c5a5c68
--- /dev/null
+++ b/examples/scopes/scopes.cs
@@ -0,0 +1,17 @@
+using System;
+using SendGrid.Helpers.Mail;
+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
+
+dynamic response = sg.client.scopes.get();
+Console.WriteLine(response.StatusCode);
+Console.WriteLine(response.Body.ReadAsStringAsync().Result);
+Console.WriteLine(response.Headers.ToString());
+Console.ReadLine();
+