Repository: sendgrid/sendgrid-java
Pull request #603 (2020-02-04 19:48:15)

docs: baseline all the templated markdown docs


Patch:
diff --git a/.github/ISSUE_TEMPLATE b/.github/ISSUE_TEMPLATE
deleted file mode 100644
index ee3ea5c..0000000
--- a/.github/ISSUE_TEMPLATE
+++ /dev/null
@@ -1,17 +0,0 @@
-#### Issue Summary
-
-A summary of the issue and the environment in which it occurs. If suitable, include the steps required to reproduce the bug. Please feel free to include screenshots, screencasts, code examples.
-
-
-#### Steps to Reproduce
-
-1. This is the first step
-2. This is the second step
-3. Further steps, etc.
-
-Any other information you want to share that is relevant to the issue being reported. Especially, why do you consider this to be a bug? What do you expect to happen instead?
-
-#### Technical details:
-
-* sendgrid-java Version: master (latest commit: [commit number])
-* Java Version: X.X
\ No newline at end of file
diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE
deleted file mode 100644
index 4aa9c56..0000000
--- a/.github/PULL_REQUEST_TEMPLATE
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-We appreciate the effort for this pull request but before that please make sure you read the contribution guidelines given above, then fill out the blanks below.
-
-**All third party contributors acknowledge that any contributions they provide will be made under the same open source license that the open source project is provided under.**
-
-Please enter each Issue number you are resolving in your PR after one of the following words [Fixes, Closes, Resolves]. This will auto-link these issues and close them when this PR is merged!
-e.g. 
-Fixes #1
-Closes #2
--->
-# Fixes # 
-
-### Checklist
-- [ ] I acknowledge that all my contributions will be made under the project's license
-- [ ] I have made a material change to the repo (functionality, testing, spelling, grammar)
-- [ ] I have read the [Contribution Guide] and my PR follows them.
-- [ ] I updated my branch with the development branch.
-- [ ] I have added tests that prove my fix is effective or that my feature works
-- [ ] I have added necessary documentation about the functionality in the appropriate .md file
-- [ ] I have added in line documentation to the code I modified
-
-### Short description of what this PR does:
-- 
-- 
-
-If you have questions, please send an email to [Sendgrid](mailto:dx@sendgrid.com), or file a Github Issue in this repository.
\ No newline at end of file
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index d2ca9db..2f0727e 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -1,42 +1,73 @@
- 
- # Twilio SendGrid Community Code of Conduct
- 
-  The Twilio 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. 
- 
- ### Be Open
- 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.
- 
- ### Be Considerate
- Members of the community are considerate of their peers, which include other contributors and users of Twilio 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 Twilio 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.
- 
- ## Additional Guidance 
- 
- ### Disclose Potential Conflicts of Interest
- 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.
- 
- ### Interpretation
- 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 [Twilio SendGrid’s cultural values](https://sendgrid.com/blog/employee-engagement-the-4h-way) defined by our “4H’s”: Happy, Hungry, Humble and Honest.  
- 
- ### Enforcement
- Most members of the Twilio 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.
- 
- ## If you have concerns about someone’s conduct
- **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.
- 
- **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.
- 
- **Contact the Moderators** - You can reach the Twilio SendGrid moderators by emailing dx@sendgrid.com.
- 
- ## Submission to Twilio SendGrid Repositories
- Finally, just a reminder, changes to the Twilio SendGrid repositories will only be accepted upon completion of the [Twilio SendGrid Contributor Agreement](https://cla.sendgrid.com). 
- 
- ## Attribution
- 
- Twilio SendGrid thanks the following, on which it draws for content and inspiration:
- 
- * [Python Community Code of Conduct](https://www.python.org/psf/codeofconduct/)  
- * [Open Source Initiative General Code of Conduct](https://opensource.org/codeofconduct) 
- * [Apache Code of Conduct](https://www.apache.org/foundation/policies/conduct.html) 
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as
+contributors and maintainers pledge to making participation in our project and
+our community a harassment-free experience for everyone, regardless of age, body
+size, disability, ethnicity, sex characteristics, gender identity and expression,
+level of experience, education, socio-economic status, nationality, personal
+appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment
+include:
+
+- Using welcoming and inclusive language
+- Being respectful of differing viewpoints and experiences
+- Gracefully accepting constructive criticism
+- Focusing on what is best for the community
+- Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+- The use of sexualized language or imagery and unwelcome sexual attention or
+  advances
+- Trolling, insulting/derogatory comments, and personal or political attacks
+- Public or private harassment
+- Publishing others' private information, such as a physical or electronic
+  address, without explicit permission
+- Other conduct which could reasonably be considered inappropriate in a
+  professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable
+behavior and are expected to take appropriate and fair corrective action in
+response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or
+reject comments, commits, code, wiki edits, issues, and other contributions
+that are not aligned to this Code of Conduct, or to ban temporarily or
+permanently any contributor for other behaviors that they deem inappropriate,
+threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community. Examples of
+representing a project or community include using an official project e-mail
+address, posting via an official social media account, or acting as an appointed
+representative at an online or offline event. Representation of a project may be
+further defined and clarified by project maintainers.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported by contacting the project team at open-source@twilio.com. All
+complaints will be reviewed and investigated and will result in a response that
+is deemed necessary and appropriate to the circumstances. The project team is
+obligated to maintain confidentiality with regard to the reporter of an incident.
+Further details of specific enforcement policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good
+faith may face temporary or permanent repercussions as determined by other
+members of the project's leadership.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
+available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
+
+[homepage]: https://www.contributor-covenant.org
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a53d0ef..9e43371 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -47,7 +47,7 @@ Before you decide to create a new issue, please try the following:
 
 ### 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/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.
+In order to make the process easier, we've included a [sample bug report template](https://github.com/sendgrid/sendgrid-java/blob/master/ISSUE_TEMPLATE.md) (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
@@ -72,7 +72,7 @@ git clone https://github.com/sendgrid/sendgrid-java.git
 cd sendgrid-java
 ```
 
-## Environment Variables
+### Environment Variables
 
 First, get your free Twilio SendGrid account [here](https://sendgrid.com/free?source=sendgrid-java).
 
diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000..6863038
--- /dev/null
+++ b/ISSUE_TEMPLATE.md
@@ -0,0 +1,26 @@
+<!--
+If this is a feature request, make sure you search Issues for an existing request before creating a new one!
+-->
+
+### Issue Summary
+A summary of the issue and the environment in which it occurs. If suitable, include the steps required to reproduce the bug. Please feel free to include screenshots, screencasts, or code examples.
+
+### Steps to Reproduce
+1. This is the first step
+2. This is the second step
+3. Further steps, etc.
+
+### Code Snippet
+```java
+# paste code here
+```
+
+### Exception/Log
+```
+# paste exception/log here
+```
+
+### Technical details:
+* sendgrid-java version:
+* java version:
+
diff --git a/LICENSE.md b/LICENSE.md
index d55059a..29aba59 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,13 +1,13 @@
-The MIT License (MIT)
+MIT License
 
-Copyright (c) 2013-2020 Twilio SendGrid, Inc.
+Copyright (C) 2020, Twilio SendGrid, Inc. <help@twilio.com>
 
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
 
 The above copyright notice and this permission notice shall be included in all
 copies or substantial portions of the Software.
diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000..215059a
--- /dev/null
+++ b/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,31 @@
+<!--
+We appreciate the effort for this pull request but before that please make sure you read the contribution guidelines, then fill out the blanks below.
+
+Please format the PR title appropriately based on the type of change:
+  <type>[!]: <description>
+Where <type> is one of: docs, chore, feat, fix, test.
+Add a '!' after the type for breaking changes (e.g. feat!: new breaking feature).
+
+**All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.**
+
+Please enter each Issue number you are resolving in your PR after one of the following words [Fixes, Closes, Resolves]. This will auto-link these issues and close them when this PR is merged!
+e.g.
+Fixes #1
+Closes #2
+-->
+
+# Fixes #
+
+A short description of what this PR does.
+
+### Checklist
+- [ ] I acknowledge that all my contributions will be made under the project's license
+- [ ] I have made a material change to the repo (functionality, testing, spelling, grammar)
+- [ ] I have read the [Contribution Guidelines](CONTRIBUTING.md) and my PR follows them
+- [ ] I have titled the PR appropriately
+- [ ] I have updated my branch with the master branch
+- [ ] I have added tests that prove my fix is effective or that my feature works
+- [ ] I have added necessary documentation about the functionality in the appropriate .md file
+- [ ] I have added inline documentation to the code I modified
+
+If you have questions, please file a [support ticket](https://twilio.com/help/contact), or create a GitHub Issue in this repository.
diff --git a/src/main/java/com/sendgrid/APICallback.java b/src/main/java/com/sendgrid/APICallback.java
index fde54f9..8504f41 100644
--- a/src/main/java/com/sendgrid/APICallback.java
+++ b/src/main/java/com/sendgrid/APICallback.java
@@ -9,11 +9,11 @@ public interface APICallback {
      * Callback method in case of an error.
      * @param ex the error that was thrown.
      */
-    public void error(Exception ex);
+    void error(Exception ex);
 
     /**
      * Callback method in case of a valid response.
      * @param response the valid response.
      */
-    public void response(Response response);
+    void response(Response response);
 }
diff --git a/src/main/java/com/sendgrid/SendGrid.java b/src/main/java/com/sendgrid/SendGrid.java
index 213cce5..3c27b31 100644
--- a/src/main/java/com/sendgrid/SendGrid.java
+++ b/src/main/java/com/sendgrid/SendGrid.java
@@ -20,9 +20,6 @@ public class SendGrid implements SendGridAPI {
 
   private ExecutorService pool;
 
-  /** The user's API key. */
-  private String apiKey;
-
   /** The Twilio SendGrid host to which to connect. */
   private String host;
 
@@ -78,7 +75,6 @@ public class SendGrid implements SendGridAPI {
    * @param apiKey the user's API key.
    */
   public void initializeSendGrid(String apiKey) {
-    this.apiKey = apiKey;
     this.host = "api.sendgrid.com";
     this.version = "v3";
     this.requestHeaders = new HashMap<String, String>();
diff --git a/src/main/java/com/sendgrid/SendGridAPI.java b/src/main/java/com/sendgrid/SendGridAPI.java
index 1d9e69f..aa9583a 100644
--- a/src/main/java/com/sendgrid/SendGridAPI.java
+++ b/src/main/java/com/sendgrid/SendGridAPI.java
@@ -10,34 +10,34 @@ public interface SendGridAPI {
    * 
    * @param apiKey is your Twilio SendGrid API Key: https://app.sendgrid.com/settings/api_keys
    */
-  public void initializeSendGrid(String apiKey);
+  void initializeSendGrid(String apiKey);
 
   /**
    * Returns the library version
    * 
    * @return the library version.
    */
-  public String getLibraryVersion();
+  String getLibraryVersion();
 
   /**
    * Gets the version.
    *
    * @return returns the version.
    */
-  public String getVersion();
+  String getVersion();
 
   /**
    * Sets the version.
    * 
    * @param version the Twilio SendGrid version.
    */
-  public void setVersion(String version);
+  void setVersion(String version);
 
   /**
    * Gets the request headers.
    * @return returns a map of request headers.
    */
-  public Map<String, String> getRequestHeaders();
+  Map<String, String> getRequestHeaders();
 
   /**
    * Adds a request headers.
@@ -46,7 +46,7 @@ public interface SendGridAPI {
    * @param value the value
    * @return returns a map of request headers.
    */
-  public Map<String, String> addRequestHeader(String key, String value);
+  Map<String, String> addRequestHeader(String key, String value);
 
   /**
    * Removes a request headers.
@@ -54,21 +54,21 @@ public interface SendGridAPI {
    * @param key the key
    * @return returns a map of request headers.
    */
-  public Map<String, String> removeRequestHeader(String key);
+  Map<String, String> removeRequestHeader(String key);
 
   /**
    * Gets the host.
    * 
    * @return returns the host.
    */
-  public String getHost();
+  String getHost();
 
   /**
    * Sets the host.
    * 
    * @param host the host to set
    */
-  public void setHost(String host);
+  void setHost(String host);
 
   /**
    * Class makeCall makes the call to the Twilio SendGrid API, override this method for
@@ -78,7 +78,7 @@ public interface SendGridAPI {
    * @return returns a response.
    * @throws IOException in case of network or marshal error.
    */
-  public Response makeCall(Request request) throws IOException;
+  Response makeCall(Request request) throws IOException;
 
   /**
    * Class api sets up the request to the Twilio SendGrid API, this is main interface.
@@ -87,5 +87,5 @@ public interface SendGridAPI {
    * @return returns a response.
    * @throws IOException in case of network or marshal error.
    */
-  public Response api(Request request) throws IOException;
+  Response api(Request request) throws IOException;
 }


Test patch:
diff --git a/src/test/java/com/sendgrid/LicenseTest.java b/src/test/java/com/sendgrid/LicenseTest.java
index 776b768..493458e 100644
--- a/src/test/java/com/sendgrid/LicenseTest.java
+++ b/src/test/java/com/sendgrid/LicenseTest.java
@@ -21,7 +21,7 @@ public class LicenseTest {
                 }
             }
         }
-        String expectedCopyright = String.format("Copyright (c) 2013-%d Twilio SendGrid, Inc.", Calendar.getInstance().get(Calendar.YEAR));
+        String expectedCopyright = String.format("Copyright (C) %d, Twilio SendGrid, Inc. <help@twilio.com>", Calendar.getInstance().get(Calendar.YEAR));
         Assert.assertEquals("License has incorrect year", copyrightText, expectedCopyright);
     }
 }
diff --git a/src/test/java/com/sendgrid/TestRequiredFilesExist.java b/src/test/java/com/sendgrid/TestRequiredFilesExist.java
index 928758b..bb5dd46 100644
--- a/src/test/java/com/sendgrid/TestRequiredFilesExist.java
+++ b/src/test/java/com/sendgrid/TestRequiredFilesExist.java
@@ -57,9 +57,9 @@ public class TestRequiredFilesExist {
         assertTrue(new File("./CONTRIBUTING.md").exists());
     }
 
-    // ./.github/ISSUE_TEMPLATE
+    // ./ISSUE_TEMPLATE.md
     @Test public void checkIssuesTemplateExists() {
-        assertTrue(new File("./.github/ISSUE_TEMPLATE").exists());
+        assertTrue(new File("./ISSUE_TEMPLATE.md").exists());
     }
 
     // ./LICENSE.md
@@ -67,9 +67,9 @@ public class TestRequiredFilesExist {
         assertTrue(new File("./LICENSE.md").exists());
     }
 
-    // ./.github/PULL_REQUEST_TEMPLATE
+    // ./PULL_REQUEST_TEMPLATE.md
     @Test public void checkPullRequestExists() {
-        assertTrue(new File("./.github/PULL_REQUEST_TEMPLATE").exists());
+        assertTrue(new File("./PULL_REQUEST_TEMPLATE.md").exists());
     }
 
     // ./README.md