Skip to content

chore: update GitHub branch references to use HEAD #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Open `csharp-http-client/CSharpHTTPClient/CSharpHTTPClient.sln`

##### Execute: #####

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

<a name="understanding-the-codebase"></a>
## Understanding the Code Base
Expand All @@ -79,20 +79,20 @@ Working examples that demonstrate usage.

**/CSharpHTTPClient/Client.cs**

An HTTP client with a fluent interface using method chaining and reflection. By returning a new object on [TryGetMember](https://github.com/sendgrid/csharp-http-client/blob/master/CSharpHTTPClient/Client.cs#L191) and [_()](https://github.com/sendgrid/csharp-http-client/blob/master/CSharpHTTPClient/Client.cs#L180), we can dynamically build the URL using method chaining and [TryGetMember](https://github.com/sendgrid/csharp-http-client/blob/master/CSharpHTTPClient/Client.cs#L191) allows us to dynamically receive the method calls to achieve reflection.
An HTTP client with a fluent interface using method chaining and reflection. By returning a new object on [TryGetMember](CSharpHTTPClient/Client.cs#L191) and [_()](CSharpHTTPClient/Client.cs#L180), we can dynamically build the URL using method chaining and [TryGetMember](CSharpHTTPClient/Client.cs#L191) allows us to dynamically receive the method calls to achieve reflection.

This allows for the following mapping from a URL to a method chain:

`/api_client/{api_key_id}/version` maps to `client.api_client._(api_key_id).version.<method>()` where <method> is a supported [Method](https://github.com/sendgrid/csharp-http-client/blob/master/CSharpHTTPClient/Client.cs#L71).
`/api_client/{api_key_id}/version` maps to `client.api_client._(api_key_id).version.<method>()` where <method> is a supported [Method](CSharpHTTPClient/Client.cs#L71).

<a name="testing"></a>
## Testing

All PRs require passing tests before the PR will be reviewed.

All test files are in the [`UnitTest`](https://github.com/sendgrid/csharp-http-client/tree/master/UnitTest) directory.
All test files are in the [`UnitTest`](UnitTest) directory.

For the purposes of contributing to this repo, please update the [`UnitTest.cs`](https://github.com/sendgrid/csharp-http-client/blob/master/UnitTest/UnitTest.cs) file with unit tests as you modify the code.
For the purposes of contributing to this repo, please update the [`UnitTest.cs`](UnitTest/UnitTest.cs) file with unit tests as you modify the code.

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

Expand Down Expand Up @@ -153,7 +153,7 @@ Generally, we follow the style guidelines as suggested by the official language.
```

7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
with a clear title and description against the `master` branch. All tests must be passing before we will review the PR.
with a clear title and description against the `main` branch. All tests must be passing before we will review the PR.

## Code Reviews<a name="code-reviews"></a>
If you can, please look at open PRs and review them. Give feedback and help us merge these PRs much faster! If you don't know how, Github has some <a href="https://help.github.com/articles/about-pull-request-reviews/">great information on how to review a Pull Request.</a>
4 changes: 2 additions & 2 deletions FIRST_TIMERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ git checkout -b <topic-branch-name>
6. __Locally merge (or rebase)__ the upstream development branch into your topic branch:
```

git pull [--rebase] upstream master
git pull [--rebase] upstream main

```
7. __Push__ your topic branch up to your fork:
Expand All @@ -49,7 +49,7 @@ git push origin <topic-branch-name>

```
8. __[Open a Pull Request](https://help.github.com/articles/creating-a-pull-request/#changing-the-branch-range-and-destination-repository/)__
with a clear title and description against the `master` branch. All tests must be passing before we will review the PR.
with a clear title and description against the `main` branch. All tests must be passing before we will review the PR.
### Important notice
Before creating a pull request, make sure that you respect the repository's constraints regarding contributions. You can find them in the [CONTRIBUTING.md](./CONTRIBUTING.md) file.
## Repositories with Open, Easy, Help Wanted, Issue Filters
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![SendGrid Logo](https://github.com/sendgrid/sendgrid-python/raw/master/twilio_sendgrid_logo.png)
![SendGrid Logo](twilio_sendgrid_logo.png)

[![Travis Badge](https://travis-ci.org/sendgrid/csharp-http-client.svg?branch=master)](https://travis-ci.org/sendgrid/csharp-http-client)
[![Travis Badge](https://travis-ci.org/sendgrid/csharp-http-client.svg?branch=main)](https://travis-ci.org/sendgrid/csharp-http-client)
[![NuGet](https://img.shields.io/nuget/v/SendGrid.CSharp.Http.Client.svg)](https://www.nuget.org/packages/SendGrid.CSharp.HTTP.Client)
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE.md)
[![Twitter Follow](https://img.shields.io/twitter/follow/sendgrid.svg?style=social&label=Follow)](https://twitter.com/sendgrid)
Expand All @@ -27,7 +27,7 @@ If you are looking for the Twilio SendGrid API client library, please see [this
# Announcements
**The default branch name for this repository has been changed to `main` as of 07/27/2020.**

All updates to this project are documented in our [CHANGELOG](https://github.com/sendgrid/csharp-http-client/blob/master/CHANGELOG.md).
All updates to this project are documented in our [CHANGELOG](CHANGELOG.md).

<a name="installation"></a>
# Installation
Expand All @@ -45,7 +45,7 @@ PM> Install-Package SendGrid.CSharp.Http.Client
```

Once you have the library properly referenced in your project, you can include calls to them in your code.
For a sample implementation, check the [Example](https://github.com/sendgrid/csharp-http-client/tree/master/Example) folder.
For a sample implementation, check the [Example](Example) folder.

Add the following namespace to use the library:
```csharp
Expand Down Expand Up @@ -101,13 +101,13 @@ If you are interested in the future direction of this project, please take a loo
<a name="contribute"></a>
# How to Contribute

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

Quick links:

- [Feature Request](https://github.com/sendgrid/csharp-http-client/blob/master/CONTRIBUTING.md#feature-request)
- [Bug Reports](https://github.com/sendgrid/csharp-http-client/blob/master/CONTRIBUTING.md#submit-a-bug-report)
- [Improvements to the Codebase](https://github.com/sendgrid/csharp-http-client/blob/master/CONTRIBUTING.md#improvements-to-the-codebase)
- [Feature Request](CONTRIBUTING.md#feature-request)
- [Bug Reports](CONTRIBUTING.md#submit-a-bug-report)
- [Improvements to the Codebase](CONTRIBUTING.md#improvements-to-the-codebase)

<a name="thanks"></a>
# Thanks
Expand Down
2 changes: 1 addition & 1 deletion USAGE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Usage

- [Example Code](https://github.com/sendgrid/csharp-http-client/blob/master/Example/Example.cs)
- [Example Code](Example/Example.cs)

## Environment Variables

Expand Down
Binary file added twilio_sendgrid_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.