Skip to content

Commit

Permalink
docs: Moved usage and enviorment variables to USAGE.md (#86)
Browse files Browse the repository at this point in the history
* Moved the example and example link along with the environment variables to the USAGE.md
* Changed the Table of Contents to reference the new USAGE.md
  • Loading branch information
rareinator authored Jul 29, 2020
1 parent 805d0b6 commit 795ca9b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 33 deletions.
33 changes: 1 addition & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ If you are looking for the SendGrid API client library, please see [this repo](h
* [Announcements](#announcements)
* [Installation](#installation)
* [Quick Start](#quick-start)
* [Usage](#usage)
* [Usage](./USAGE.md)
* [Roadmap](#roadmap)
* [How to Contribute](#contribute)
* [About](#about)
Expand Down Expand Up @@ -116,37 +116,6 @@ try {
}
```

<a name="usage"></a>
# Usage

- [Example Code](https://github.com/sendgrid/java-http-client/tree/master/examples)
- [Library Usage Documentation](USAGE.md)


The example uses SendGrid, you can get your free account [here](https://sendgrid.com/free?source=java-http-client).

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

```bash
echo "export SENDGRID_API_KEY='YOUR_API_KEY'" > sendgrid.env
echo "sendgrid.env" >> .gitignore
source ./sendgrid.env
```

```bash
mvn package
cd examples
javac -classpath {path_to}/sendgrid-java-http-client-4.0.0-jar.jar:. Example.java && java -classpath {path_to}/sendgrid-java-http-client-4.0.0-jar.jar:. Example
```

## Environment Variables

You can do the following to create a .env file:

```cp .env_example .env```

Then, just add your API Key into your .env file.

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

Expand Down
10 changes: 9 additions & 1 deletion USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,12 @@ source ./sendgrid.env
mvn package
cd examples
javac -classpath {path_to}/sendgrid-java-http-client-4.0.0-jar.jar:. Example.java && java -classpath {path_to}/sendgrid-java-http-client-4.0.0-jar.jar:. Example
```
```

## Environment Variables

You can do the following to create a .env file:

```cp .env_example .env```

Then, just add your API Key into your .env file.

0 comments on commit 795ca9b

Please # to comment.