Skip to content

Commit 1e2111f

Browse files
Merge branch 'v3release'
2 parents 5ee89f8 + 2e52cfb commit 1e2111f

File tree

79 files changed

+15467
-4052
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+15467
-4052
lines changed

.github/ISSUE_TEMPLATE

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#### Issue Summary
2+
3+
A summary of the issue and the environment in which it occurs. If suitable, include the steps required to reproduce the bug. Please feel free to include screenshots, screencasts, code examples.
4+
5+
6+
#### Steps to Reproduce
7+
8+
1. This is the first step
9+
2. This is the second step
10+
3. Further steps, etc.
11+
12+
Any other information you want to share that is relevant to the issue being reported. Especially, why do you consider this to be a bug? What do you expect to happen instead?
13+
14+
#### Technical details:
15+
16+
* sendgrid-csharp Version: master (latest commit: [commit number])
17+
* .NET Version: 4.5.2

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ SendGrid/packages/
1919
SendGrid/TestResult.xml
2020
SendGrid/SendGrid.sln.VisualState.xml
2121
*.pfx
22-
*.PublicKey
22+
*.PublicKey
23+
SendGrid/.vs/config/applicationhost.config

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ install:
77
- nuget restore SendGrid/SendGrid.sln
88
- nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory testrunner
99
script:
10-
- xbuild /p:Configuration=BuildNet45 SendGrid/SendGrid.sln
11-
- mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe SendGrid/Tests/bin/BuildNet45/Tests.dll
10+
- xbuild /p:Configuration=Release /p:DebugSymbols=False /p:TargetFrameworkVersion="v4.5" SendGrid/SendGrid.sln
1211
- mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe SendGrid/UnitTest/bin/Release/UnitTest.dll
1312
notifications:
1413
hipchat:

CHANGELOG.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,43 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## [7.0.0] - 2016-06-13
5+
### Added
6+
- Breaking change to support the v3 Web API
7+
- New HTTP client
8+
- v3 Mail Send helper
9+
410
## [6.3.4] - 2015-12-15
5-
###Added
11+
### Added
612
- Implemented the global stats /asm/stats endpoint [GET]
713

814
## [6.3.3] - 2015-12-14
9-
###Added
15+
### Added
1016
- Implemented the global suppressions /asm/suppressions/global endpoint [GET, POST, DELETE]
1117

1218
## [6.3.2] - 2015-12-11
13-
###Added
19+
### Added
1420
- Implemented the suppressions /asm/groups/:group_id/suppressions endpoint [GET, POST, DELETE]
1521

1622
## [6.3.1] - 2015-12-10
17-
###Added
23+
### Added
1824
- Implemented the unsubscribe groups /asm/groups endpoint [GET, POST, DELETE]
1925

2026
## [6.3.0] - 2015-11-24
21-
###Added
27+
### Added
2228
- Send emails using API Key
2329

2430
## [6.2.0] - 2015-11-18
25-
###Added
31+
### Added
2632
- Added support for using the Web API v3 endpoints
2733
- Implemented the api_keys endpoint [GET, POST, PATCH, DELETE]
2834

2935
## [6.1.0] - 2015-4-27
30-
###Added
36+
### Added
3137
- Added support for sending via API keys in addition to credentials. Pass an API Key string to the Web transport constructor
3238

3339
## [6.0.1] - 2015-4-24
34-
###Fixed
40+
### Fixed
3541
- Fixed the endpoint URL. (⌒_⌒;)
3642

3743
## [6.0.0] - 2015-4-22
@@ -56,7 +62,6 @@ Deliver method. All other changes are backwards compatible.
5662
### Fixed
5763
- Invalid Protocol Exception in Mono due to the way the endpoint URL was
5864
being assigned (thanks @mdymel, @rbarinov)
59-
6065
- Connections were not being reused. This was causing degraded
6166
performance with multiple threads open. Performance should be much
6267
better. (with help from @gatesvp)

CONTRIBUTING.md

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
Hello! Thank you for choosing to help contribute to one of the SendGrid open source libraries. There are many ways you can contribute and help is always welcome. We simply ask that you follow the following contribution policies.
2+
3+
- [CLAs and CCLAs](#cla)
4+
- [Roadmap & Milestones](#roadmap)
5+
- [Feature Request](#feature_request)
6+
- [Submit a Bug Report](#submit_a_bug_report)
7+
- [Improvements to the Codebase](#improvements_to_the_codebase)
8+
- [Understanding the Code Base](#understanding_the_codebase)
9+
- [Testing](#testing)
10+
- [Style Guidelines & Naming Conventions](#style_guidelines_and_naming_conventions)
11+
- [Creating a Pull Request](#creating_a_pull_request)
12+
13+
<a name="roadmap"></a>
14+
We use [Milestones](https://github.com/sendgrid/sendgrid-csharp/milestones) to help define current roadmaps, please feel free to grab an issue from the current milestone. Please indicate that you have begun work on it to avoid collisions. Once a PR is made, community review, comments, suggestions and additional PRs are welcomed and encouraged.
15+
16+
<a name="cla"></a>
17+
## CLAs and CCLAs
18+
19+
Before you get started, SendGrid requires that a SendGrid Contributor License Agreement (CLA) or a SendGrid Company Contributor Licensing Agreement (CCLA) be filled out by every contributor to a SendGrid open source project.
20+
21+
Our goal with the CLA and CCLA is to clarify the rights of our contributors and reduce other risks arising from inappropriate contributions. The CLA also clarifies the rights SendGrid holds in each contribution and helps to avoid misunderstandings over what rights each contributor is required to grant to SendGrid when making a contribution. In this way the CLA and CCLA encourage broad participation by our open source community and help us build strong open source projects, free from any individual contributor withholding or revoking rights to any contribution.
22+
23+
SendGrid does not merge a pull request made against a SendGrid open source project until that pull request is associated with a signed CLA (or CCLA). Copies of the CLA and CCLA are available [here](https://drive.google.com/a/sendgrid.com/file/d/0B0PlcM9qA91LN2VEUTJWU2RIVXc/view).
24+
25+
You may submit your completed [CLA or CCLA](https://drive.google.com/a/sendgrid.com/file/d/0B0PlcM9qA91LN2VEUTJWU2RIVXc/view) to SendGrid at [[email protected]](mailto:[email protected]). SendGrid will then confirm you are ready to begin making contributions.
26+
27+
There are a few ways to contribute, which we'll enumerate below:
28+
29+
<a name="feature_request"></a>
30+
## Feature Request
31+
32+
If you'd like to make a feature request, please read this section.
33+
34+
The GitHub issue tracker is the preferred channel for library feature requests, but please respect the following restrictions:
35+
36+
- Please **search for existing issues** in order to ensure we don't have duplicate bugs/feature requests.
37+
- Please be respectful and considerate of others when commenting on issues
38+
39+
<a name="submit_a_bug_report"></a>
40+
## Submit a Bug Report
41+
42+
Note: DO NOT include your credentials in ANY code examples, descriptions, or media you make public.
43+
44+
A software bug is a demonstrable issue in the code base. In order for us to diagnose the issue and respond as quickly as possible, please add as much detail as possible into your bug report.
45+
46+
Before you decide to create a new issue, please try the following:
47+
48+
1. Check the Github issues tab if the identified issue has already been reported, if so, please add a +1 to the existing post.
49+
2. Update to the latest version of this code and check if issue has already been fixed
50+
3. Copy and fill in the Bug Report Template we have provided below
51+
52+
### Please use our Bug Report Template
53+
54+
In order to make the process easier, we've included a [sample bug report template](https://github.com/sendgrid/sendgrid-csharp/.github/ISSUE_TEMPLATE) (borrowed from [Ghost](https://github.com/TryGhost/Ghost/)). The template uses [GitHub flavored markdown](https://help.github.com/articles/github-flavored-markdown/) for formatting.
55+
56+
<a name="improvements_to_the_codebase"></a>
57+
## Improvements to the Codebase
58+
59+
We welcome direct contributions to the sendgrid-csharp code base. Thank you!
60+
61+
### Development Environment ###
62+
63+
#### Install and Run Locally ####
64+
65+
##### Prerequisites #####
66+
67+
- .NET 4.5.2
68+
- [SendGrid.CSharp.HTTP.Client](https://www.nuget.org/packages/SendGrid.CSharp.HTTP.Client/)
69+
- [Newtonsoft.Json](http://www.newtonsoft.com/json)
70+
71+
##### Initial setup: #####
72+
73+
```bash
74+
git clone https://github.com/sendgrid/sendgrid-csharp.git
75+
```
76+
77+
Open `sendgrid-csharp/SendGrid/SendGrid.sln`
78+
79+
## Environment Variables
80+
81+
First, get your free SendGrid account [here](https://sendgrid.com/free?source=sendgrid-csharp).
82+
83+
Next, update your Environment (user space) with your [SENDGRID_API_KEY](https://app.sendgrid.com/settings/api_keys).
84+
85+
##### Execute: #####
86+
87+
- Check out the documentation for [Web API v3 endpoints](https://sendgrid.com/docs/API_Reference/Web_API_v3/index.html).
88+
- Review the corresponding [examples](https://github.com/sendgrid/sendgrid-csharp/blob/v3beta/examples).
89+
- You can add your test code to our [Example Project](https://github.com/sendgrid/sendgrid-csharp/blob/v3beta/SendGrid/Example/Example.cs).
90+
91+
<a name="understanding_the_codebase"></a>
92+
## Understanding the Code Base
93+
94+
**/examples**
95+
96+
Examples that demonstrate usage.
97+
98+
**/Example/Example.cs**
99+
100+
A working example project for testing.
101+
102+
**/SendGrid/SendGrid.cs**
103+
104+
The main interface to the SendGrid API is the class `SendGridAPIClient`.
105+
106+
**/UnitTest**
107+
108+
Unit tests
109+
110+
<a name="testing"></a>
111+
## Testing
112+
113+
All PRs require passing tests before the PR will be reviewed.
114+
115+
All test files are in the [`UnitTest`](https://github.com/sendgrid/sendgrid-csharp/tree/v3beta/SendGrid/UnitTest) directory.
116+
117+
For the purposes of contributing to this repo, please update the [`UnitTest.cs`](https://github.com/sendgrid/sendgrid-csharp/tree/v3beta/test/SendGrid/UnitTest/UnitTest.cs) file with unit tests as you modify the code.
118+
119+
<!--- describe how to run the tests --->
120+
121+
<a name="style_guidelines_and_naming_conventions"></a>
122+
## Style Guidelines & Naming Conventions
123+
124+
Generally, we follow the style guidelines as suggested by the official language. However, we ask that you conform to the styles that already exist in the library. If you wish to deviate, please explain your reasoning. In this case, we generally follow the [C# Naming Conventions](https://msdn.microsoft.com/library/ms229045(v=vs.100).aspx) and the suggestions provided by the Visual Studio IDE.
125+
126+
## Creating a Pull Request<a name="creating_a_pull_request"></a>
127+
128+
1. [Fork](https://help.github.com/fork-a-repo/) the project, clone your fork,
129+
and configure the remotes:
130+
131+
```bash
132+
# Clone your fork of the repo into the current directory
133+
git clone https://github.com/sendgrid/sendgrid-csharp
134+
# Navigate to the newly cloned directory
135+
cd sendgrid-python
136+
# Assign the original repo to a remote called "upstream"
137+
git remote add upstream https://github.com/sendgrid/sendgrid-csharp
138+
```
139+
140+
2. If you cloned a while ago, get the latest changes from upstream:
141+
142+
```bash
143+
git checkout <dev-branch>
144+
git pull upstream <dev-branch>
145+
```
146+
147+
3. Create a new topic branch (off the main project development branch) to
148+
contain your feature, change, or fix:
149+
150+
```bash
151+
git checkout -b <topic-branch-name>
152+
```
153+
154+
4. Commit your changes in logical chunks. Please adhere to these [git commit
155+
message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
156+
or your code is unlikely be merged into the main project. Use Git's
157+
[interactive rebase](https://help.github.com/articles/interactive-rebase)
158+
feature to tidy up your commits before making them public.
159+
160+
4a. Create tests.
161+
162+
4b. Create or update the example code that demonstrates the functionality of this change to the code.
163+
164+
5. Locally merge (or rebase) the upstream development branch into your topic branch:
165+
166+
```bash
167+
git pull [--rebase] upstream master
168+
```
169+
170+
6. Push your topic branch up to your fork:
171+
172+
```bash
173+
git push origin <topic-branch-name>
174+
```
175+
176+
7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
177+
with a clear title and description against the `master` branch. All tests must be passing before we will review the PR.
178+
179+
If you have any additional questions, please feel free to [email](mailto:[email protected]) us or create an issue in this repo.
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
The MIT License (MIT)
2-
3-
Copyright (c) 2016 SendGrid
4-
5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
11-
12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2012-2016 SendGrid, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)