Skip to content

Commit 2051122

Browse files
committed
2 parents 6d5b126 + b85634b commit 2051122

44 files changed

Lines changed: 2621 additions & 2694 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/PULL_REQUEST_TEMPLATE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!--
2+
Please explain WHAT you changed.
3+
4+
The title should be descriptive, for example:
5+
6+
* *Fixed a typo in the apikeypermissions.md page*
7+
* *Added the maximum number of domain whitelabels you can create to domains.md*
8+
* *Fixing the number of days a batch id is valid in scheduling_parameters.md*
9+
10+
If this PR fixes an issue, please reference the issue number as well.
11+
12+
Fill out this form in the body:
13+
-->
14+
Closes: #[Issue number]
15+
16+
**Description of the change**:
17+
18+
If you have questions, please send an email [Sendgrid](mailto:dx@sendgrid.com), or file a Github Issue in this repository.
19+

.travis.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,19 @@ matrix:
1010
jdk: oraclejdk7
1111
- os: linux
1212
jdk: oraclejdk8
13+
before_script:
14+
- "./scripts/startPrism.sh &"
15+
- sleep 20
16+
before_install:
17+
- cat /etc/hosts # optionally check the content *before*
18+
- sudo hostname "$(hostname | cut -c1-63)"
19+
- sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts > /tmp/hosts
20+
- sudo mv /tmp/hosts /etc/hosts
21+
- cat /etc/hosts # optionally check the content *after*
1322
after_script:
14-
- "./gradlew build"
15-
- "./scripts/upload.sh"
23+
- lsof -i :4010 -S # adds some debugging statements
24+
- "./gradlew build"
25+
- "./scripts/upload.sh"
1626
env:
1727
global:
1828
- S3_POLICY: ewogICJleHBpcmF0aW9uIjogIjIxMDAtMDEtMDFUMTI6MDA6MDAuMDAwWiIsCiAgImNvbmRpdGlvbnMiOiBbCiAgICB7ImFjbCI6ICJwdWJsaWMtcmVhZCIgfSwKICAgIHsiYnVja2V0IjogInNlbmRncmlkLW9wZW4tc291cmNlIiB9LAogICAgWyJzdGFydHMtd2l0aCIsICIka2V5IiwgInNlbmRncmlkLWphdmEvIl0sCiAgICBbImNvbnRlbnQtbGVuZ3RoLXJhbmdlIiwgMjA0OCwgMjY4NDM1NDU2XSwKICAgIFsiZXEiLCAiJENvbnRlbnQtVHlwZSIsICJhcHBsaWNhdGlvbi96aXAiXQogIF0KfQo=

CHANGELOG.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## [4.1.1] - 2017-10-10
5+
### Added
6+
- PR #247 Added Javadocs.
7+
- BIG thanks to [Andy Trimble](https://github.com/andy-trimble)
8+
49
## [4.1.0] - 2017-08-16
510
### Added
611
- PR #211 Return empty collections in place of nulls
@@ -15,12 +20,12 @@ All notable changes to this project will be documented in this file.
1520
### BREAKING CHANGE
1621
- PR #162 Update java http client dependency to [4.1.0 from 2.3.4](https://github.com/sendgrid/java-http-client/releases)
1722
- BIG thanks to [Diego Camargo](https://github.com/belfazt) for the pull request!
18-
- The breaking change is that variables that were public are now private and accessable only via getters and setters
19-
- The `Request` object attributes are now only accessable through getters/setters
23+
- The breaking change is that variables that were public are now private and accessible only via getters and setters
24+
- The `Request` object attributes are now only accessible through getters/setters
2025
- `request.method` is now `request.setMethod(string)`
2126
- `request.endpoint` is now `request.setEndpoint(string)`
2227
- `request.body` is now `request.setBody(string)`
23-
- The `Response` object attributes are now only accessable through getters/setters
28+
- The `Response` object attributes are now only accessible through getters/setters
2429
- `response.statusCode` is now `response.getStatusCode()`
2530
- `response.body` is now `response.getBody()`
2631
- `response.headers` is now `response.getHeaders()`
@@ -113,7 +118,7 @@ request.addQueryParam("limit", "1");
113118

114119
## [2.2.2] - 2015-5-23
115120
### Fixed
116-
- Subsitution orders being swapped via [#65](https://github.com/sendgrid/sendgrid-java/pull/65)
121+
- Substitution orders being swapped via [#65](https://github.com/sendgrid/sendgrid-java/pull/65)
117122

118123
## [2.2.1] - 2015-5-14
119124
### Changed

CODE_OF_CONDUCT.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
2+
# SendGrid Community Code of Conduct
3+
4+
The SendGrid open source community is made up of members from around the globe with a diverse set of skills, personalities, and experiences. It is through these differences that our community experiences successes and continued growth. When you're working with members of the community, we encourage you to follow these guidelines, which help steer our interactions and strive to maintain a positive, successful and growing community.
5+
6+
### Be Open
7+
Members of the community are open to collaboration, whether it's on pull requests, code reviews, approvals, issues or otherwise. We're receptive to constructive comments and criticism, as the experiences and skill sets of all members contribute to the whole of our efforts. We're accepting of all who wish to take part in our activities, fostering an environment where anyone can participate, and everyone can make a difference.
8+
9+
### Be Considerate
10+
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.
11+
12+
### Be Respectful
13+
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.
14+
15+
## Additional Guidance
16+
17+
### Disclose Potential Conflicts of Interest
18+
Community discussions often involve interested parties. We expect participants to be aware when they are conflicted due to employment or other projects they are involved in and disclose those interests to other project members. When in doubt, over-disclose. Perceived conflicts of interest are important to address so that the community’s decisions are credible even when unpopular, difficult or favorable to the interests of one group over another.
19+
20+
### Interpretation
21+
This Code is not exhaustive or complete. It is not a rulebook; it serves to distill our common understanding of a collaborative, shared environment and goals. We expect it to be followed in spirit as much as in the letter. When in doubt, try to abide by [SendGrid’s cultural values](https://sendgrid.com/blog/employee-engagement-the-4h-way) defined by our “4H’s”: Happy, Hungry, Humble and Honest.
22+
23+
### Enforcement
24+
Most members of the SendGrid community always comply with this Code, not because of the existence of this Code, but because they have long experience participating in open source communities where the conduct described above is normal and expected. However, failure to observe this Code may be grounds for suspension, reporting the user for abuse or changing permissions for outside contributors.
25+
26+
## If you have concerns about someone’s conduct
27+
**Initiate Direct Contact** - It is always appropriate to email a community member (if contact information is available), mention that you think their behavior was out of line, and (if necessary) point them to this Code.
28+
29+
**Discuss Publicly** - Discussing publicly is always acceptable. Note, though, that approaching the person directly may be better, as it tends to make them less defensive, and it respects the time of other community members, so you probably want to try direct contact first.
30+
31+
**Contact the Moderators** - You can reach the SendGrid moderators by emailing dx@sendgrid.com.
32+
33+
## Submission to SendGrid Repositories
34+
Finally, just a reminder, changes to the SendGrid repositories will only be accepted upon completion of the [SendGrid Contributor Agreement](https://cla.sendgrid.com).
35+
36+
## Attribution
37+
38+
SendGrid thanks the following, on which it draws for content and inspiration:
39+
40+
* [Python Community Code of Conduct](https://www.python.org/psf/codeofconduct/)
41+
* [Open Source Initiative General Code of Conduct](https://opensource.org/codeofconduct)
42+
* [Apache Code of Conduct](https://www.apache.org/foundation/policies/conduct.html)

CONTRIBUTING.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ Hello! Thank you for choosing to help contribute to one of the SendGrid open sou
22

33
- [CLAs and CCLAs](#cla)
44
- [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)
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)
99
- [Testing](#testing)
10-
- [Style Guidelines & Naming Conventions](#style_guidelines_and_naming_conventions)
11-
- [Creating a Pull Request](#creating_a_pull_request)
10+
- [Style Guidelines & Naming Conventions](#style-guidelines-and-naming-conventions)
11+
- [Creating a Pull Request](#creating-a-pull-request)
1212

1313
<a name="roadmap"></a>
1414
We use [Milestones](https://github.com/sendgrid/sendgrid-java/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.
@@ -26,7 +26,7 @@ When you create a Pull Request, after a few seconds, a comment will appear with
2626

2727
There are a few ways to contribute, which we'll enumerate below:
2828

29-
<a name="feature_request"></a>
29+
<a name="feature-request"></a>
3030
## Feature Request
3131

3232
If you'd like to make a feature request, please read this section.
@@ -36,7 +36,7 @@ The GitHub issue tracker is the preferred channel for library feature requests,
3636
- Please **search for existing issues** in order to ensure we don't have duplicate bugs/feature requests.
3737
- Please be respectful and considerate of others when commenting on issues
3838

39-
<a name="submit_a_bug_report"></a>
39+
<a name="submit-a-bug-report"></a>
4040
## Submit a Bug Report
4141

4242
Note: DO NOT include your credentials in ANY code examples, descriptions, or media you make public.
@@ -51,9 +51,9 @@ Before you decide to create a new issue, please try the following:
5151

5252
### Please use our Bug Report Template
5353

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

56-
<a name="improvements_to_the_codebase"></a>
56+
<a name="improvements-to-the-codebase"></a>
5757
## Improvements to the Codebase
5858

5959
We welcome direct contributions to the sendgrid-java code base. Thank you!
@@ -102,10 +102,10 @@ touch Example.java
102102
Add the example you want to test to Example.java, including the headers at the top of the file.
103103

104104
``` bash
105-
javac -classpath ../repo/com/sendgrid/4.1.0/sendgrid-4.1.0-jar.jar:. Example.java && java -classpath ../repo/com/sendgrid/4.1.0/sendgrid-4.1.0-jar.jar:. Example
105+
javac -classpath ../repo/com/sendgrid/4.1.1/sendgrid-4.1.0-jar.jar:. Example.java && java -classpath ../repo/com/sendgrid/4.1.0/sendgrid-4.1.1-jar.jar:. Example
106106
```
107107

108-
<a name="understanding_the_codebase"></a>
108+
<a name="understanding-the-codebase"></a>
109109
## Understanding the Code Base
110110

111111
**/examples**
@@ -129,7 +129,7 @@ All test files are in the [`tests`](https://github.com/sendgrid/sendgrid-java/tr
129129

130130
For the purposes of contributing to this repo, please update the [`SendGridTest.java`](https://github.com/sendgrid/sendgrid-java/tree/master/src/test/java/com/sendgrid/SendGridTest.java) file with unit tests as you modify the code.
131131

132-
1. Download [prism](https://stoplight.io/prism/) for your platform ([Mac OS X](https://github.com/stoplightio/prism/releases/download/v0.1.5/prism_darwin_amd64)) and save the binary to the sendgrid-ruby directory (or any directory you would like. The sendgrid-ruby directory is chosen mostly for convenience.)
132+
1. Download [prism](http://stoplight.io/platform/prism/) for your platform ([Mac OS X](https://github.com/stoplightio/prism/releases/download/v0.6.21/prism_darwin_amd64), [Linux](https://github.com/stoplightio/prism/releases/download/v0.6.21/prism_linux_amd64), [Windows](https://github.com/stoplightio/prism/releases/download/v0.6.21/prism_windows_amd64.exe)) and save the binary to the sendgrid-java directory (or any directory you would like. The sendgrid-java directory is chosen mostly for convenience.)
133133

134134
1. Add execute permissions
135135

@@ -149,7 +149,7 @@ For the purposes of contributing to this repo, please update the [`SendGridTest.
149149
./gradlew test -i
150150
```
151151

152-
<a name="style_guidelines_and_naming_conventions"></a>
152+
<a name="style-guidelines-and-naming-conventions"></a>
153153
## Style Guidelines & Naming Conventions
154154

155155
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.
@@ -158,7 +158,9 @@ Please run your code through:
158158
- [FindBugs](http://findbugs.sourceforge.net/)
159159
- [CheckStyle](http://checkstyle.sourceforge.net/) with [Google's Java Style Guide](http://checkstyle.sourceforge.net/reports/google-java-style.html).
160160

161-
## Creating a Pull Request<a name="creating_a_pull_request"></a>
161+
<a name="creating-a-pull-request"></a>
162+
## Creating a Pull Request
163+
162164

163165
1. [Fork](https://help.github.com/fork-a-repo/) the project, clone your fork,
164166
and configure the remotes:
@@ -167,7 +169,7 @@ Please run your code through:
167169
# Clone your fork of the repo into the current directory
168170
git clone https://github.com/sendgrid/sendgrid-java
169171
# Navigate to the newly cloned directory
170-
cd sendgrid-python
172+
cd sendgrid-java
171173
# Assign the original repo to a remote called "upstream"
172174
git remote add upstream https://github.com/sendgrid/sendgrid-java
173175
```

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) 2013-2016 SendGrid
3+
Copyright (c) 2013-2017 SendGrid
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: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
![SendGrid Logo](https://uiux.s3.amazonaws.com/2016-logos/email-logo%402x.png)
2+
13
[![Travis Badge](https://travis-ci.org/sendgrid/sendgrid-java.svg?branch=master)](https://travis-ci.org/sendgrid/sendgrid-java)
4+
[![Maven Central](https://img.shields.io/maven-central/v/com.sendgrid/sendgrid-java.svg)](http://mvnrepository.com/artifact/com.sendgrid/sendgrid-java)
25
[![Email Notifications Badge](https://dx.sendgrid.com/badge/java)](https://dx.sendgrid.com/newsletter/java)
6+
[![Twitter Follow](https://img.shields.io/twitter/follow/sendgrid.svg?style=social&label=Follow)](https://twitter.com/sendgrid)
7+
[![GitHub contributors](https://img.shields.io/github/contributors/sendgrid/sendgrid-java.svg)](https://github.com/sendgrid/sendgrid-java/graphs/contributors)
8+
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE.txt)
39

410
**NEW:** Subscribe to email [notifications](https://dx.sendgrid.com/newsletter/java) for releases and breaking changes.
511

@@ -9,21 +15,22 @@ Version 3.X.X of this library provides full support for all SendGrid [Web API v3
915

1016
This library represents the beginning of a new path for SendGrid. We want this library to be community driven and SendGrid led. We need your help to realize this goal. To help make sure we are building the right things in the right order, we ask that you create [issues](https://github.com/sendgrid/sendgrid-java/issues) and [pull requests](https://github.com/sendgrid/sendgrid-java/blob/master/CONTRIBUTING.md) or simply upvote or comment on existing issues or pull requests.
1117

12-
Please browse the rest of this README for further detail.
18+
Please browse the rest of this README for further details.
1319

1420
We appreciate your continued support, thank you!
1521

1622
# Table of Contents
1723

1824
* [Installation](#installation)
19-
* [Quick Start](#quick_start)
25+
* [Quick Start](#quick-start)
2026
* [Usage](#usage)
21-
* [Use Cases](#use_cases)
27+
* [Use Cases](#use-cases)
2228
* [Announcements](#announcements)
2329
* [Roadmap](#roadmap)
2430
* [How to Contribute](#contribute)
2531
* [Troubleshooting](#troubleshooting)
2632
* [About](#about)
33+
* [License](#license)
2734

2835
<a name="installation"></a>
2936
# Installation
@@ -54,7 +61,7 @@ Add the following to your build.gradle file in the root of your project.
5461
...
5562
dependencies {
5663
...
57-
compile 'com.sendgrid:sendgrid-java:4.1.0'
64+
compile 'com.sendgrid:sendgrid-java:4.1.1'
5865
}
5966
6067
repositories {
@@ -79,7 +86,7 @@ You can just drop the jar file in. It's a fat jar - it has all the dependencies
7986

8087
- [Java-HTTP-Client](https://github.com/sendgrid/java-http-client)
8188

82-
<a name="quick_start"></a>
89+
<a name="quick-start"></a>
8390
# Quick Start
8491

8592
## Hello Email
@@ -180,7 +187,7 @@ public class Example {
180187
- [v3 Web API Mail Send Helper](https://github.com/sendgrid/sendgrid-java/tree/master/src/main/java/com/sendgrid/helpers) - build a request object payload for a v3 /mail/send API call.
181188

182189

183-
<a name="use_cases"></a>
190+
<a name="use-cases"></a>
184191
# Use Cases
185192

186193
[Examples of common API use cases](https://github.com/sendgrid/sendgrid-java/blob/master/USE_CASES.md), such as how to send an email with a transactional template.
@@ -204,10 +211,10 @@ We encourage contribution to our libraries (you might even score some nifty swag
204211

205212
Quick links:
206213

207-
- [Feature Request](https://github.com/sendgrid/sendgrid-java/blob/master/CONTRIBUTING.md#feature_request)
208-
- [Bug Reports](https://github.com/sendgrid/sendgrid-java/blob/master/CONTRIBUTING.md#submit_a_bug_report)
214+
- [Feature Request](https://github.com/sendgrid/sendgrid-java/blob/master/CONTRIBUTING.md#feature-request)
215+
- [Bug Reports](https://github.com/sendgrid/sendgrid-java/blob/master/CONTRIBUTING.md#submit-a-bug-report)
209216
- [Sign the CLA to Create a Pull Request](https://github.com/sendgrid/sendgrid-java/blob/master/CONTRIBUTING.md#cla)
210-
- [Improvements to the Codebase](https://github.com/sendgrid/sendgrid-java/blob/master/CONTRIBUTING.md#improvements_to_the_codebase)
217+
- [Improvements to the Codebase](https://github.com/sendgrid/sendgrid-java/blob/master/CONTRIBUTING.md#improvements-to-the-codebase)
211218

212219
<a name="troubleshooting"></a>
213220
# Troubleshooting
@@ -221,5 +228,5 @@ sendgrid-java is guided and supported by the SendGrid [Developer Experience Team
221228

222229
sendgrid-java is maintained and funded by SendGrid, Inc. The names and logos for sendgrid-java are trademarks of SendGrid, Inc.
223230

224-
![SendGrid Logo]
225-
(https://uiux.s3.amazonaws.com/2016-logos/email-logo%402x.png)
231+
# License
232+
[The MIT License (MIT)](LICENSE.txt)

0 commit comments

Comments
 (0)