Skip to content

Commit 85c05df

Browse files
Updated to confirm to SendGrid's Open Source Policies
1 parent 906c752 commit 85c05df

File tree

4 files changed

+70
-194
lines changed

4 files changed

+70
-194
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
3+
34
This project adheres to [Semantic Versioning](http://semver.org/).
45

56
## [1.0.2] - 2016-03-17

CONTRIBUTING.md

Lines changed: 30 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
1-
Hello! Thank you for choosing to help contribute to the csharp-http-client. There are many ways you can contribute and help is always welcome.
2-
1+
Hello! Thank you for choosing to help contribute to one of the SendGrid open source projects. 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>
314
We use [Milestones](https://github.com/sendgrid/csharp-http-client/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.
415

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)
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.
1226

1327
There are a few ways to contribute, which we'll enumerate below:
1428

@@ -37,29 +51,7 @@ Before you decide to create a new issue, please try the following:
3751

3852
### Please use our Bug Report Template
3953

40-
In order to make the process easier, we've included a sample bug report 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.
41-
42-
```
43-
Short and descriptive example bug report title
44-
45-
#### Issue Summary
46-
47-
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.
48-
49-
50-
#### Steps to Reproduce
51-
52-
1. This is the first step
53-
2. This is the second step
54-
3. Further steps, etc.
55-
56-
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?
57-
58-
#### Technical details:
59-
60-
* csharp-http-client Version: master (latest commit: 2cb34372ef0f31352f7c90015a45e1200cb849da)
61-
* C# Version: 4.5
62-
```
54+
In order to make the process easier, we've included a [sample bug report template](https://github.com/sendgrid/csharp-http-client/.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.
6355

6456
<a name="improvements_to_the_codebase"></a>
6557
## Improvements to the Codebase
@@ -68,24 +60,23 @@ We welcome direct contributions to the csharp-http-client code base. Thank you!
6860

6961
### Development Environment ###
7062

71-
#### Install and run locally ####
63+
#### Install and Run Locally ####
7264

7365
##### Prerequisites #####
7466

75-
* Microsoft Visual Studio Community 2015
76-
* There are no external dependencies
67+
- Microsoft Visual Studio Community 2015 or greater
7768

7869
##### Initial setup: #####
7970

80-
```
71+
```bash
8172
git clone https://github.com/sendgrid/csharp-http-client.git
8273
```
8374

8475
Open `csharp-http-client/CSharpHTTPClient/CSharpHTTPClient.sln`
8576

8677
##### Execute: #####
8778

88-
See the [Example project](https://github.com/sendgrid/csharp-http-client/tree/master/Example) to get started quickly.
79+
SSee the [Example project](https://github.com/sendgrid/csharp-http-client/tree/master/Example) to get started quickly.
8980

9081
<a name="understanding_the_codebase"></a>
9182
## Understanding the Code Base
@@ -113,21 +104,11 @@ For the purposes of contributing to this repo, please update the [`UnitTest.cs`]
113104

114105
From the Visual Studio menu: `Tests->Run->All Tests`
115106

116-
### Execute: ###
117-
118-
Click on the Example project, then click the `Start` button in the menu.
119-
120107
<a name="style_guidelines_and_naming_conventions"></a>
121108
## Style Guidelines & Naming Conventions
122109

123110
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.
124111

125-
### Directory Structure
126-
127-
* `CSharpHTTPClient`, for the HTTP API client
128-
* `Example`, for example calls
129-
* `UnitTest`, for all tests
130-
131112
## Creating a Pull Request<a name="creating_a_pull_request"></a>
132113

133114
1. [Fork](https://help.github.com/fork-a-repo/) the project, clone your fork,
@@ -137,7 +118,7 @@ Generally, we follow the style guidelines as suggested by the official language.
137118
# Clone your fork of the repo into the current directory
138119
git clone https://github.com/sendgrid/csharp-http-client
139120
# Navigate to the newly cloned directory
140-
cd csharp-http-client
121+
cd sendgrid-python
141122
# Assign the original repo to a remote called "upstream"
142123
git remote add upstream https://github.com/sendgrid/csharp-http-client
143124
```
@@ -181,4 +162,4 @@ Generally, we follow the style guidelines as suggested by the official language.
181162
7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
182163
with a clear title and description against the `master` branch. All tests must be passing before we will review the PR.
183164

184-
If you have any additional questions, please feel free to [email](mailto:[email protected]) us or create an issue in this repo.
165+
If you have any additional questions, please feel free to [email](mailto:[email protected]) us or create an issue in this repo.

LICENSE renamed to LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 SendGrid
3+
Copyright (c) 2016 SendGrid, Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 38 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
11
[![Travis Badge](https://travis-ci.org/sendgrid/csharp-http-client.svg?branch=master)](https://travis-ci.org/sendgrid/csharp-http-client)
22

3-
**Quickly and easily access any REST or REST-like API.**
3+
**This project allows you to quickly and easily access any REST or REST-like API.**
4+
5+
# Announcements
6+
7+
All updates to this project is documented in our [CHANGELOG](https://github.com/sendgrid/csharp-http-client/blob/master/CHANGELOG.md).
8+
9+
# Installation
10+
11+
To use CSharp.HTTP.Client in your C# project, you can either <a href="https://github.com/sendgrid/csharp-http-client.git">download the SendGrid C# .NET libraries directly from our Github repository</a> or, if you have the NuGet package manager installed, you can grab them automatically.
12+
13+
```
14+
PM> Install-Package SendGrid.CSharp.Http.Client
15+
```
16+
17+
Once you have the library properly referenced in your project, you can include calls to them in your code.
18+
For a sample implementation, check the [Example](https://github.com/sendgrid/csharp-http-client/tree/master/Example) folder.
19+
20+
Add the following namespace to use the library:
21+
```csharp
22+
using SendGrid.CSharp.HTTP.Client;
23+
```
24+
25+
# Quick Start
426

527
Here is a quick example:
628

@@ -33,162 +55,34 @@ Console.WriteLine(response.ResponseBody.ReadAsStringAsync().Result);
3355
Console.WriteLine(response.ResponseHeaders.ToString());
3456
```
3557

36-
# Installation
37-
38-
To use CSharp.HTTP.Client in your C# project, you can either <a href="https://github.com/sendgrid/csharp-http-client.git">download the SendGrid C# .NET libraries directly from our Github repository</a> or, if you have the NuGet package manager installed, you can grab them automatically.
39-
40-
```
41-
PM> Install-Package SendGrid.CSharp.Http.Client
42-
```
43-
44-
Once you have the library properly referenced in your project, you can include calls to them in your code.
45-
For a sample implementation, check the [Example](https://github.com/sendgrid/csharp-http-client/tree/master/Example) folder.
46-
47-
Add the following namespace to use the library:
48-
```csharp
49-
using SendGrid.CSharp.HTTP.Client;
50-
```
51-
52-
## Usage ##
53-
54-
Following is an example using SendGrid. You can get your free account [here](https://sendgrid.com/free?source=csharp-http-client).
58+
# Usage
5559

56-
First, update your Environment Variable with your [SENDGRID_APIKEY](https://app.sendgrid.com/settings/api_keys).
60+
- [Example Code](https://github.com/sendgrid/csharp-http-client/blob/master/Example/Example.cs)
5761

58-
Following is an abridged example, here is the [full working code](https://github.com/sendgrid/csharp-http-client/blob/master/Example/Example.cs).
62+
## Roadmap
5963

60-
```csharp
61-
using System;
62-
using System.Collections.Generic;
63-
using SendGrid.CSharp.HTTP.Client;
64-
using System.Web.Script.Serialization;
65-
66-
class Example
67-
{
68-
static void Main(string[] args)
69-
{
70-
String host = "https://api.sendgrid.com";
71-
Dictionary<String, String> requestHeaders = new Dictionary<String, String>();
72-
string apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
73-
requestHeaders.Add("Authorization", "Bearer " + apiKey);
74-
requestHeaders.Add("Content-Type", "application/json");
75-
76-
String version = "v3";
77-
dynamic client = new Client(host, requestHeaders, version);
78-
79-
// GET Collection
80-
string queryParams = @"{
81-
'limit': 100
82-
}";
83-
dynamic response = client.version("v3").api_keys.get(queryParams: queryParams);
84-
var dssResponseBody = response.DeserializeResponseBody(response.ResponseBody);
85-
foreach ( var value in dssResponseBody["result"])
86-
{
87-
Console.WriteLine("name: {0}, api_key_id: {1}",value["name"], value["api_key_id"]);
88-
}
89-
90-
var dssResponseHeaders = response.DeserializeResponseHeaders(response.ResponseHeaders);
91-
foreach (var pair in dssResponseHeaders)
92-
{
93-
Console.WriteLine("{0}: {1}", pair.Key, pair.Value);
94-
}
95-
96-
Console.WriteLine("\n\nPress any key to continue to POST.");
97-
Console.ReadLine();
98-
99-
// POST
100-
string requestBody = @"{
101-
'name': 'My API Key 5',
102-
'scopes': [
103-
'mail.send',
104-
'alerts.create',
105-
'alerts.read'
106-
]
107-
}";
108-
response = client.api_keys.post(requestBody: requestBody);
109-
Console.WriteLine(response.StatusCode);
110-
Console.WriteLine(response.ResponseBody.ReadAsStringAsync().Result);
111-
Console.WriteLine(response.ResponseHeaders.ToString());
112-
JavaScriptSerializer jss = new JavaScriptSerializer();
113-
var ds_response = jss.Deserialize<Dictionary<string, dynamic>>(response.ResponseBody.ReadAsStringAsync().Result);
114-
string api_key_id = ds_response["api_key_id"];
115-
116-
Console.WriteLine("\n\nPress any key to continue to GET single.");
117-
Console.ReadLine();
118-
119-
// GET Single
120-
response = client.api_keys._(api_key_id).get();
121-
Console.WriteLine(response.StatusCode);
122-
Console.WriteLine(response.ResponseBody.ReadAsStringAsync().Result);
123-
Console.WriteLine(response.ResponseHeaders.ToString());
124-
125-
Console.WriteLine("\n\nPress any key to continue to PATCH.");
126-
Console.ReadLine();
127-
128-
// PATCH
129-
request_body = @"{
130-
'name': 'A New Hope'
131-
}";
132-
response = client.api_keys._(api_key_id).patch(requestBody: requestBody);
133-
Console.WriteLine(response.StatusCode);
134-
Console.WriteLine(response.ResponseBody.ReadAsStringAsync().Result);
135-
Console.WriteLine(response.ResponseHeaders.ToString());
136-
137-
Console.WriteLine("\n\nPress any key to continue to PUT.");
138-
Console.ReadLine();
139-
140-
// PUT
141-
request_body = @"{
142-
'name': 'A New Hope',
143-
'scopes': [
144-
'user.profile.read',
145-
'user.profile.update'
146-
]
147-
}";
148-
response = client.api_keys._(api_key_id).put(requestBody: requestBody);
149-
Console.WriteLine(response.StatusCode);
150-
Console.WriteLine(response.ResponseBody.ReadAsStringAsync().Result);
151-
Console.WriteLine(response.ResponseHeaders.ToString());
152-
153-
Console.WriteLine("\n\nPress any key to continue to DELETE.");
154-
Console.ReadLine();
155-
156-
// DELETE
157-
response = client.api_keys._(api_key_id).delete();
158-
Console.WriteLine(response.StatusCode);
159-
Console.WriteLine(response.ResponseHeaders.ToString());
160-
161-
Console.WriteLine("\n\nPress any key to exit.");
162-
Console.ReadLine();
163-
}
164-
}
165-
```
166-
167-
# Announcements
168-
169-
[2016.03.18] - We hit version 1!
64+
If you are intersted in the future direction of this project, please take a look at our [milestones](https://github.com/sendgrid/csharp-http-client/milestones). We would love to hear your feedback.
17065

171-
# Roadmap
66+
## How to Contribute
17267

173-
[Milestones](https://github.com/sendgrid/csharp-http-client/milestones)
68+
We encourage contribution to our projects, please see our [CONTRIBUTING](https://github.com/sendgrid/csharp-http-client/blob/master/CONTRIBUTING.md) guide for details.
17469

175-
# How to Contribute
70+
Quick links:
17671

177-
We encourage contribution to our libraries, please see our [CONTRIBUTING](https://github.com/sendgrid/csharp-http-client/blob/master/CONTRIBUTING.md) guide for details.
178-
179-
* [Feature Request](https://github.com/sendgrid/csharp-http-client/blob/master/CONTRIBUTING.md#feature_request)
180-
* [Bug Reports](https://github.com/sendgrid/csharp-http-client/blob/master/CONTRIBUTING.md#submit_a_bug_report)
181-
* [Improvements to the Codebase](https://github.com/sendgrid/csharp-http-client/blob/master/CONTRIBUTING.md#improvements_to_the_codebase)
72+
- [Feature Request](https://github.com/sendgrid/csharp-http-client/blob/master/CONTRIBUTING.mdCONTRIBUTING.md#feature_request)
73+
- [Bug Reports](https://github.com/sendgrid/csharp-http-client/blob/master/CONTRIBUTING.md#submit_a_bug_report)
74+
- [Sign the CLA to Create a Pull Request](https://github.com/sendgrid/csharp-http-client/blob/master/CONTRIBUTING.md#cla)
75+
- [Improvements to the Codebase](https://github.com/sendgrid/csharp-http-client/blob/master/CONTRIBUTING.md#improvements_to_the_codebase)
18276

18377
# Thanks
18478

18579
We were inspired by the work done on [birdy](https://github.com/inueni/birdy) and [universalclient](https://github.com/dgreisen/universalclient).
18680

18781
# About
18882

189-
![SendGrid Logo]
190-
(https://assets3.sendgrid.com/mkt/assets/logos_brands/small/sglogo_2015_blue-9c87423c2ff2ff393ebce1ab3bd018a4.png)
191-
19283
csharp-http-client is guided and supported by the SendGrid [Developer Experience Team](mailto:[email protected]).
19384

194-
csharp-http-client is maintained and funded by SendGrid, Inc. The names and logos for python-http-client are trademarks of SendGrid, Inc.
85+
csharp-http-client is maintained and funded by SendGrid, Inc. The names and logos for csharp-http-client are trademarks of SendGrid, Inc.
86+
87+
![SendGrid Logo]
88+
(https://assets3.sendgrid.com/mkt/assets/logos_brands/small/sglogo_2015_blue-9c87423c2ff2ff393ebce1ab3bd018a4.png)ß

0 commit comments

Comments
 (0)