コード例 #1
0
ファイル: ApiClient.cs プロジェクト: deltaDirk/luno-dotnet
        protected ApiClient(ApiKeyConnection connection)
        {
            Ensure.ArgumentNotNull(connection, nameof(connection));

            ApiKeyConnection = connection;
            HttpConnection   = new HttpConnection(ApiKeyConnection);
        }
コード例 #2
0
        internal HttpConnection(ApiKeyConnection connection)
        {
            Ensure.ArgumentNotNull(connection, nameof(connection));
            Ensure.ArgumentNotNullOrEmptyString(connection.ApiKey, nameof(connection.ApiKey));
            Ensure.ArgumentNotNullOrEmptyString(connection.SecretKey, nameof(connection.SecretKey));

            _apiKey    = connection.ApiKey;
            _secretKey = connection.SecretKey;
        }
コード例 #3
0
 public LunoClient(ApiKeyConnection connection)
     : base(connection)
 {
     Analytics         = new AnalyticsClient(connection);
     ApiAuthentication = new ApiAuthenticationClient(connection);
     Event             = new EventClient(connection);
     Session           = new SessionClient(connection);
     User = new UsersClient(connection);
 }
コード例 #4
0
ファイル: Program.cs プロジェクト: 0xdeafcafe/sendgrid-dotnet
        public static void Main(string[] args)
        {
            var key    = new ApiKeyConnection("SG.api.key");
            var client = new SendGridClient(key);

            client.MailClient.SendAsync(new Email
            {
                Personalizations = new List <Personalization>
                {
                    new Personalization
                    {
                        To = new List <EmailDetail>
                        {
                            new EmailDetail
                            {
                                Email = "*****@*****.**",
                                Name  = "Customer Name"
                            }
                        }
                    }
                },
                From = new EmailDetail
                {
                    Email = "*****@*****.**",
                    Name  = "Company Letter"
                },
                Subject = "sup",
                Content = new List <Content>
                {
                    new Content
                    {
                        Type  = "text/html",
                        Value = "<h1>yo yo! :)</h1>"
                    }
                }
            }).Wait();
        }
コード例 #5
0
ファイル: ApiClient.cs プロジェクト: movna/sendgrid-dotnet
 protected ApiClient(ApiKeyConnection connection)
 {
     ApiKeyConnection = connection;
     HttpConnection   = new HttpConnection(ApiKeyConnection);
 }
コード例 #6
0
 internal MailClient(ApiKeyConnection connection)
     : base(connection)
 {
 }
コード例 #7
0
 internal SessionClient(ApiKeyConnection connection)
     : base(connection)
 {
 }
コード例 #8
0
ファイル: UsersClient.cs プロジェクト: deltaDirk/luno-dotnet
 internal UsersClient(ApiKeyConnection connection)
     : base(connection)
 {
 }
コード例 #9
0
 internal HttpConnection(ApiKeyConnection connection)
 {
     _apiKey = connection.ApiKey;
 }
コード例 #10
0
 internal ApiAuthenticationClient(ApiKeyConnection connection)
     : base(connection)
 {
 }
コード例 #11
0
ファイル: EventClient.cs プロジェクト: deltaDirk/luno-dotnet
 internal EventClient(ApiKeyConnection connection)
     : base(connection)
 {
 }
コード例 #12
0
 internal AnalyticsClient(ApiKeyConnection connection)
     : base(connection)
 {
 }
コード例 #13
0
 public SendGridClient(ApiKeyConnection connection)
     : base(connection)
 {
     MailClient = new MailClient(connection);
 }