Пример #1
0
 /// <summary>
 ///     Create a client that connects to the SendGrid Web API
 /// </summary>
 /// <param name="apiKey">Your SendGrid API Key</param>
 /// <param name="baseUri">Base SendGrid API Uri</param>
 public Client(string apiKey, string baseUri = "https://api.sendgrid.com/")
 {
     _baseUri = new Uri(baseUri);
     _apiKey = apiKey;
     Version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
     ApiKeys = new APIKeys(this);
     UnsubscribeGroups = new UnsubscribeGroups(this);
     Suppressions = new Suppressions(this);
     GlobalSuppressions = new GlobalSuppressions(this);
     GlobalStats = new GlobalStats(this);
 }
Пример #2
0
 private void Initialize()
 {
     Version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
     ApiKeys = new APIKeys( this );
     UnsubscribeGroups = new UnsubscribeGroups( this );
     Suppressions = new Suppressions( this );
     GlobalSuppressions = new GlobalSuppressions( this );
     GlobalStats = new GlobalStats( this );
     Templates = new Templates( this );
     Versions = new Versions( this );
     Batches = new Batches( this );
 }