File tree Expand file tree Collapse file tree 3 files changed +33
-2
lines changed Expand file tree Collapse file tree 3 files changed +33
-2
lines changed Original file line number Diff line number Diff line change 22
22
/.settings /
23
23
/.classpath
24
24
/.project
25
+
26
+ # Environment files
27
+ .env /* . *
Original file line number Diff line number Diff line change @@ -117,7 +117,34 @@ try {
117
117
118
118
<a name =" usage " ></a >
119
119
# Usage
120
- [ Library Usage Documentation] ( USAGE.md )
120
+
121
+ - [ Example Code] ( https://github.com/sendgrid/java-http-client/tree/master/examples )
122
+ - [ Library Usage Documentation] ( USAGE.md )
123
+
124
+
125
+ The example uses SendGrid, you can get your free account [ here] ( https://sendgrid.com/free?source=java-http-client ) .
126
+
127
+ First, update your environment with your [ SENDGRID_API_KEY] ( https://app.sendgrid.com/settings/api_keys ) .
128
+
129
+ ``` bash
130
+ echo " export SENDGRID_API_KEY='YOUR_API_KEY'" > sendgrid.env
131
+ echo " sendgrid.env" >> .gitignore
132
+ source ./sendgrid.env
133
+ ```
134
+
135
+ ``` bash
136
+ mvn package
137
+ cd examples
138
+ 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
139
+ ```
140
+
141
+ ## Environment Variables
142
+
143
+ You can do the following to create a .env file:
144
+
145
+ ``` cp .env_example .env ```
146
+
147
+ Then, just add your API Key into your .env file.
121
148
122
149
<a name =" roadmap " ></a >
123
150
# Roadmap
@@ -144,4 +171,4 @@ java-http-client is guided and supported by the SendGrid [Developer Experience T
144
171
java-http-client is maintained and funded by SendGrid, Inc. The names and logos for java-http-client are trademarks of SendGrid, Inc.
145
172
146
173
# License
147
- [ The MIT License (MIT)] ( LICENSE.md )
174
+ [ The MIT License (MIT)] ( LICENSE.txt )
Original file line number Diff line number Diff line change
1
+ export SENDGRID_API_KEY=''
You can’t perform that action at this time.
0 commit comments