Skip to content
This repository was archived by the owner on Aug 20, 2020. It is now read-only.

Update .md files in the repo. Improve the language of these .md files. #96

Closed
wants to merge 7 commits into from
Closed
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
14 changes: 7 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,32 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [2.3.0] - 2016-10-12
### Added
- Pull #6, Solves #5
- Invoke the API callback with a mocked response upon Error
- Invoke the API callback with a mocked response on Error
- Thanks [Dan Foley](https://github.com/cantremember)!

## [2.2.2] - 2016-09-27
### Fixed
- Fix GitHub URLs in package.json #4: https://github.com/sendgrid/sendgrid-nodejs/pull/4
- Fix GitHub URLs in `package.json` #4: https://github.com/sendgrid/sendgrid-nodejs/pull/4
- Thanks [Guilherme Souza](https://github.com/sitegui)!

## [2.2.1] - 2016-06-15
### Fixed
- Sending email with accents: https://github.com/sendgrid/sendgrid-nodejs/issues/239
- Send email with accents: https://github.com/sendgrid/sendgrid-nodejs/issues/239
- Thanks [eaparango](https://github.com/eaparango)!

## [2.2.0] - 2016-06-10
### Added
- Automatically add Content-Type: application/json when there is a request body
- Automatically add **Header** in HTTP request whenever there is a request body `Content-Type: application/json`

## [2.1.0] - 2016-06-08
### Added
- Cleaner request object initialization
- Ability to use http for testing
- Ability to use HTTP for testing

## [2.0.0] - 2016-06-06
### Changed
- Made the Request and Response variables non-redundant. e.g. request.requestBody becomes request.body
- Request and Response variables are non-redundant. Example: `request.requestBody` changed to `request.body`

## [1.0.1] - 2016-04-08
### Added
- We are live!
- We are live!
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Members of the community are open to collaboration, whether it's on pull request
Members of the community are considerate of their peers, which include other contributors and users of SendGrid. We're thoughtful when addressing the efforts of others, keeping in mind that often the labor was completed with the intent of the good of the community. We're attentive in our communications, whether in person or online, and we're tactful when approaching differing views.

### Be Respectful
Members of the community are respectful. We're respectful of others, their positions, their skills, their commitments and their efforts. We're respectful of the volunteer efforts that permeate the SendGrid community. We're respectful of the processes outlined in the community, and we work within them. When we disagree, we are courteous in raising our issues. Overall, we're good to each other. We contribute to this community not because we have to, but because we want to. If we remember that, these guidelines will come naturally.
Members of the community are respectful. We're respectful of others, their positions, their skills, their commitments, and their efforts. We're respectful of the volunteer efforts that permeate the SendGrid community. We're respectful of the processes outlined in the community, and we work within them. When we disagree, we are courteous in raising our issues. Overall, we're good with each other. We contribute to this community not because we have to, but because we want to. If we remember that, these guidelines will come naturally.

## Additional Guidance

Expand Down
57 changes: 28 additions & 29 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
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.
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.

- [CLAs and CCLAs](#clas-and-cclas)
- [Roadmap & Milestones](#roadmap-and-milestones)
Expand All @@ -11,14 +11,14 @@ Hello! Thank you for choosing to help contribute to one of the SendGrid open sou
- [Creating a Pull Request](#creating-a-pull-request)

<a name="roadmap-and-milestones"></a>
We use [Milestones](https://github.com/sendgrid/nodejs-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.
We use [Milestones](https://github.com/sendgrid/nodejs-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, the community reviews, comments and suggests for better changes. Additional PRs are welcomed and encouraged.

<a name="clas-and-cclas"></a>
## CLAs and CCLAs

Before you get started, SendGrid requires that a SendGrid Contributor License Agreement (CLA) be filled out by every contributor to a SendGrid open source project.
Before you get started, SendGrid requires that a **SendGrid Contributor License Agreement (CLA)** be filled out by every contributor to a SendGrid open source project.

Our goal with the CLA 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 encourages broad participation by our open source community and helps us build strong open source projects, free from any individual contributor withholding or revoking rights to any contribution.
Our goal with the CLA is to clarify the rights of our contributors and reduce other risks arising from inappropriate contributions. The CLA also clarifies the rights that SendGrid holds in each contribution. The CLA also helps to disambiguate the rights that each contributor can be granted by SendGrid whilst making a contribution. In this way the CLA encourages broad participation by our open source community and helps us build strong open source projects, free from any individual contributor withholding or revoking rights to any contribution.

SendGrid does not merge a pull request made against a SendGrid open source project until that pull request is associated with a signed CLA. Copies of the CLA are available [here](https://gist.github.com/SendGridDX/98b42c0a5d500058357b80278fde3be8#file-sendgrid_cla).

Expand All @@ -39,33 +39,33 @@ The GitHub issue tracker is the preferred channel for library feature requests,
<a name="submit-a-bug-report"></a>
## Submit a Bug Report

Note: DO NOT include your credentials in ANY code examples, descriptions, or media you make public.
>**Note**: DO NOT include your credentials in ANY code examples, descriptions, or media that you make public.

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.
A software bug is a demonstrable issue in the code base. Please add as much detail as possible in your bug report so that we can diagnose the issue and respond as quickly as possible.

Before you decide to create a new issue, please try the following:

1. Check the Github issues tab if the identified issue has already been reported, if so, please add a +1 to the existing post.
2. Update to the latest version of this code and check if issue has already been fixed
3. Copy and fill in the Bug Report Template we have provided below
1. Check the Github issues tab if the identified issue has already been reported, in that case, please add a +1 to the existing post.
2. Update to the latest version of this code and check if issue has already been fixed.
3. Copy and fill in the Bug Report Template we have provided below.

### Please use our Bug Report Template

In order to make the process easier, we've included a [sample bug report template](https://github.com/sendgrid/nodejs-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.
In order to make the process easier, we've included a *[sample bug report template](https://github.com/sendgrid/nodejs-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.

<a name="improvements-to-the-codebase"></a>
## Improvements to the Codebase

We welcome direct contributions to the nodejs-http-client code base. Thank you!
We welcome direct contributions to the **nodejs-http-client** code base. Thank you!

### Development Environment ###

#### Install and Run Locally ####

##### Prerequisites #####

- Node.js version 0.10, 0.12 or 4
- Please see [package.json](https://github.com/sendgrid/nodejs-http-client/blob/master/package.json)
- Node.JS version 0.10, 0.12 or 4
- Please see [`package.json`](https://github.com/sendgrid/nodejs-http-client/blob/master/package.json)

##### Initial setup: #####

Expand Down Expand Up @@ -99,26 +99,27 @@ node ./examples/example.js

**/examples**

Working examples that demonstrate usage.
Working examples that demonstrate the usage.

**client.js**

There is an object to hold both the request and response to the API server.

The main function that does the heavy lifting (and external entry point) is `API`.
The main function that does the heavy lifting (and external entry point) is **API**.

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

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

All test files are in [`test/test.js`](https://github.com/sendgrid/nodejs-http-client/blob/master/test/test.js).

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

Run the test:

`mocha`
```bash
mocha
```

<a name="style-guidelines-and-naming-conventions"></a>
## Style Guidelines & Naming Conventions
Expand All @@ -129,7 +130,7 @@ Generally, we follow the style guidelines as suggested by the official language.

Please run your code through:

- [ESLint](http://eslint.org/) with the standard style guide.
- [ESLint](http://eslint.org/) with a standard style guide.
- [esdoc](https://github.com/sendgrid/nodejs-http-client/blob/master/USAGE.md) to check the documentation coverage of your added code.

<a name="creating-a-pull-request"></a>
Expand All @@ -141,8 +142,10 @@ Please run your code through:
```bash
# Clone your fork of the repo into the current directory
git clone https://github.com/sendgrid/nodejs-http-client

# Navigate to the newly cloned directory
cd nodejs-http-client

# Assign the original repo to a remote called "upstream"
git remote add upstream https://github.com/sendgrid/nodejs-http-client
```
Expand All @@ -162,28 +165,24 @@ Please run your code through:
```

4. Commit your changes in logical chunks. Please adhere to these [git commit
message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
or your code is unlikely to be merged into the main project. Use Git's
[interactive rebase](https://help.github.com/articles/interactive-rebase)
feature to tidy up your commits before making them public.
message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) or your code is unlikely to be merged into the main project. Use Git's [interactive rebase](https://help.github.com/articles/interactive-rebase) feature to tidy up your commits before making them public.

4a. Create tests.
4 *a*. Create tests.

4b. Create or update the example code that demonstrates the functionality of this change to the code.
4 *b*. Create or update the example code that demonstrates the functionality of the changes to the code.

5. Locally merge (or rebase) the upstream development branch into your topic branch:

```bash
git pull [--rebase] upstream master
```

6. Push your topic branch up to your fork:
7. Push your topic branch up to your fork:

```bash
git push origin <topic-branch-name>
```

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.
8. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) with a clear title and description against the **master branch**. All the tests must be passed before we review the PR.

If you have any additional questions, please feel free to [email](mailto:[email protected]) us or create an issue in this repo.
If you have any questions, please feel free to [email](mailto:[email protected]) us or create an issue in this repository.
53 changes: 30 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
[![GitHub contributors](https://img.shields.io/github/contributors/sendgrid/nodejs-http-client.svg)](https://github.com/sendgrid/nodejs-http-client/graphs/contributors)
[![MIT license](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE.md)

**Quickly and easily access any RESTful or RESTful-like API.**
**Quickly and easily access any RESTful or RESTful-*like* API.**

If you are looking for the SendGrid API client library, please see [this repo](https://github.com/sendgrid/sendgrid-nodejs).
If you are looking for the SendGrid API client library, please see this [repo](https://github.com/sendgrid/sendgrid-nodejs).

# Announcements

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

# Table of Contents
- [Installation](#installation)
Expand All @@ -29,13 +29,14 @@ All updates to this library are documented in our [CHANGELOG](https://github.com

## Prerequisites

- Node.js version 0.10, 0.12 or 4
- Node.JS version 0.10, 0.12 or 4

You need to have a API key to use the app. To configure the API key in the environment variables follow these steps.
- create .env file in the root directory of the project.
- Copy the contents of .env_sample file in to the .env file
- Once you have obtained the API key, find the environment variable SENDGRID_API_KEY and assign your API key as it's value.
As an example it should look like this
You need to have a **API key** to use the app. To configure the API key in the environment variables follow these steps:
- create `.env` file in the root directory of the project.
- Copy the contents of `.env_sample` file in to the `.env` file
- Once you have obtained the API key, find the environment variable - `SENDGRID_API_KEY` and assign this value to your API key.

It should look like this:
```
SENDGRID_API_KEY='<YOUR_API_KEY>';
```
Expand All @@ -50,7 +51,7 @@ npm install sendgrid-rest
<a name="quick-start"></a>
# Quick Start

`GET /your/api/{param}/call`
**`GET`**`/your/api/{param}/call`

```javascript
var Client = require('sendgrid-rest').Client
Expand All @@ -67,7 +68,7 @@ client.API(request, function (response) {
})
```

`POST /your/api/{param}/call` with headers, query parameters and a request body.
**`POST`**`/your/api/{param}/call` with headers, query parameters and a request body.

```javascript
var Client = require('sendgrid-rest').Client
Expand Down Expand Up @@ -100,13 +101,16 @@ Following is an example using SendGrid. You can get your free account [here](htt

First, update your environment with your [SENDGRID_API_KEY](https://app.sendgrid.com/settings/api_keys).

You can copy the .env_example file located in the "examples" folder to ```.env``` in your project's root.

```cp examples/.env_sample .env```
You can copy the `.env_example` file located in the "examples" folder to `.env` in your project's root.

Once you have edited the file and added your API Key, you can add the variable to your environment:
```source .env```
```bash
cp examples/.env_sample .env
```

Once you have edited the file and added your API Key, you can add the variables to your environment:
```bash
source .env
```

Here is the [full working code](https://github.com/sendgrid/nodejs-http-client/blob/master/examples/example.js).

Expand All @@ -115,24 +119,27 @@ To run the example:
```bash
node examples/example
```
=======
---
[Library Usage Documentation](https://github.com/sendgrid/nodejs-http-client/blob/master/USAGE.md)

# Tests

Tests can be run through a [Docker](https://www.docker.com) container which is defined in the [docker-compose.yml](docker-compose.yml) file.
Tests can be run through a [Docker](https://www.docker.com) container which is defined in the [`docker-compose.yml`](docker-compose.yml) file.

To run the tests, simply run `docker-compose up`.
To run the tests, simply run
```bash
docker-compose up
```

<a name="roadmap"></a>
# Roadmap

If you are interested in the future direction of this project, please take a look at our [milestones](https://github.com/sendgrid/nodejs-http-client/milestones). We would love to hear your feedback.
If you are interested in the future directions of this project, please take a look at our [milestones](https://github.com/sendgrid/nodejs-http-client/milestones). We would love to hear your feedback.

<a name="contribute"></a>
# How to Contribute

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

* [Feature Request](https://github.com/sendgrid/nodejs-http-client/blob/master/CONTRIBUTING.md#feature-request)
* [Bug Reports](https://github.com/sendgrid/nodejs-http-client/blob/master/CONTRIBUTING.md#submit-a-bug-report)
Expand All @@ -141,9 +148,9 @@ We encourage contribution to our libraries, please see our [CONTRIBUTING](https:
<a name="about"></a>
# About

nodejs-http-client is guided and supported by the SendGrid [Developer Experience Team](mailto:[email protected]).
**nodejs-http-client** is guided and supported by the SendGrid [Developer Experience Team](mailto:[email protected]).

nodejs-http-client is maintained and funded by SendGrid, Inc. The names and logos for nodejs-http-client are trademarks of SendGrid, Inc.
**nodejs-http-client** is maintained and funded by SendGrid, Inc. The names and logos for **nodejs-http-client** are trademarks of SendGrid, Inc.

<a name="license"></a>
# License
Expand Down
2 changes: 1 addition & 1 deletion TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ If you can't find a solution below, please open an [issue](https://github.com/se
<a name="request-body"></a>
## Viewing the Request Body

When debugging or testing, it may be useful to examine the raw request body to compare against the [documented format](https://sendgrid.com/docs/API_Reference/api_v3.html).
While debugging or testing, it may be useful to examine the raw request body to compare with the [documented format](https://sendgrid.com/docs/API_Reference/api_v3.html).

You can do this with something like:
```javascript
Expand Down
8 changes: 5 additions & 3 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ node examples/example

If you would like to auto-generate documentation of the packages, you can do so locally by running:

`./node_modules/.bin/esdoc`
```bash
./node_modules/.bin/esdoc
```

Using the .esdoc.json file, esdoc will create documentation in the docs directory.
Using the `.esdoc.json` file, **esdoc** will create documentation in the docs directory.

## Checking docs coverage

You will find a coverage.json file in the **docs** directory. This will contain information about the documentation coverage for each of the different files in this repo.
You will find a `coverage.json` file in the **docs** directory. This contains information about the documentation coverage for each of the different files in this repository.
Loading