Skip to content

Commit 690e8c6

Browse files
committed
Merge pull request #2 from BlockScore/java-4.0
Java 4.0
2 parents bbe90ca + 7076c82 commit 690e8c6

File tree

71 files changed

+4561
-4365
lines changed

Some content is hidden

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

71 files changed

+4561
-4365
lines changed

CHANGELOG

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
=== 4.0.0 2015-06-04
2+
3+
- Added support for version 4 of the API
4+
5+
=== 3.0.2 2014-10-03
6+
7+
- Fixed a bug in listing verifications.
8+
9+
=== 3.0.1 2014-10-01
10+
11+
- Initial release

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2013-2015 BlockScore
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 47 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,57 @@
1-
blockscore-java
2-
===============
1+
# blockscore-java [![Circle CI](https://circleci.com/gh/BlockScore/blockscore-java/tree/java-4.0.svg?style=shield)](https://circleci.com/gh/BlockScore/blockscore-java/tree/java-4.0)
32

4-
An API wrapper for the BlockScore API using Java.
3+
This is the official library for Java clients of the BlockScore API. [Click here to read the full documentation including code examples](http://docs.blockscore.com/v4.0/java/).
54

6-
Latest Revision: <b>3.0.2</b> <br />
7-
API Compatibility: <b>3.0</b>
5+
## Requirements
86

9-
##Release Notes
10-
Version: 3.0.2
7+
- Java 1.7 and later
118

12-
1. Fixed a bug in listing verifications.
9+
## Installation
1310

14-
##System Requirements (For building and usage)
15-
1. Java 1.7+
11+
### Maven users
12+
13+
### Gradle users
1614

17-
##How to build
1815
1. Clone this repository
1916
2. `./gradlew build`
2017
3. `./gradlew jar` (Builds the standard JAR) or `./gradlew fatJar` (Builds the plug and play jar)
2118

22-
##How to run code quality tools
23-
1. Checkstyle (Ensures code style) `./gradlew checkstyleMain`
24-
2. PMD (Checks for bugs) `./gradlew pmdMain`
25-
3. Findbugs (Checks for bugs) `./gradlew findbugsMain`
26-
4. JUnit (Tests) `./gradlew build`
27-
28-
##Dependencies Required (If using standard JAR)
29-
1. Retrofit 1.6.1+
30-
2. Retrofit Converter-Jackson 1.6.1+
31-
3. RxJava 1.0+
32-
4. OkHTTP 2.0+
33-
5. OkHTTP UrlConnection 2.0+
19+
### Others
20+
21+
You can download our JAR files from here: https://github.com/BlockScore/blockscore-java/releases
22+
23+
## Usage
24+
25+
```java
26+
BlockscoreApiClient client = new BlockscoreApiClient("your api key here");
27+
28+
Address address = new Address();
29+
address.setStreet1("1 Infinite Loop")
30+
.setStreet2("Apt 6")
31+
.setCity("Cupertino")
32+
.setSubdivision("CA")
33+
.setPostalCode("95014")
34+
.setCountryCode("US");
35+
36+
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
37+
Date dateOfBirth = dateOfBirth = formatter.parse("1980-08-23");
38+
39+
Person.Builder personBuilder = new Person.Builder(client);
40+
personBuilder.setFirstName("John")
41+
.setMiddleName("Pearce")
42+
.setLastName("Doe")
43+
.setDocumentType("ssn")
44+
.setDocumentValue("0000")
45+
.setAddress(address)
46+
.setDateOfBirth(dateOfBirth);
47+
48+
Person person = personBuilder.create();
49+
```
50+
51+
## Generating Javadocs
52+
53+
Enter `./gradlew docs` and a new copy of the Javadocs can be found in `build/docs/javadoc`.
54+
55+
## Testing
56+
57+
You must have gradle installed. Tests can be run by typing `./gradlew :test`.

build.gradle

Lines changed: 54 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
buildscript {
2-
repositories {
3-
jcenter()
4-
}
2+
repositories {
3+
jcenter()
4+
}
55

6-
dependencies {
7-
classpath 'eu.appsatori:gradle-fatjar-plugin:0.3'
8-
}
6+
dependencies {
7+
classpath 'eu.appsatori:gradle-fatjar-plugin:0.3'
8+
}
99
}
1010

1111
apply plugin: 'java'
@@ -15,47 +15,69 @@ apply plugin: 'checkstyle'
1515
apply plugin: 'eu.appsatori.fatjar'
1616

1717
sourceCompatibility = 1.7
18-
version = '3.0.2'
18+
targetCompatibility = 1.7
19+
version = '4.0.0'
1920

2021
repositories {
21-
mavenCentral()
22+
mavenCentral()
23+
}
24+
25+
checkstyle {
26+
toolVersion = "6.7"
2227
}
2328

2429
dependencies {
25-
compile 'com.squareup.retrofit:retrofit:+'
26-
compile 'com.squareup.retrofit:converter-jackson:+'
27-
compile 'io.reactivex:rxjava:+'
28-
compile 'com.squareup.okhttp:okhttp:+'
29-
compile 'com.squareup.okhttp:okhttp-urlconnection:+'
30+
compile 'com.squareup.retrofit:retrofit:+'
31+
compile 'com.squareup.retrofit:converter-jackson:+'
32+
compile 'com.squareup.okhttp:okhttp:+'
33+
compile 'com.squareup.okhttp:okhttp-urlconnection:+'
3034

31-
//Used for static analysis
32-
compile 'com.intellij:annotations:+'
33-
compile 'com.google.code.findbugs:annotations:+'
35+
//Used for static analysis
36+
compile 'com.intellij:annotations:+'
37+
compile 'com.google.code.findbugs:annotations:+'
38+
39+
//Used for testing only.
40+
testCompile 'junit:junit:+'
41+
}
3442

35-
//Used for testing only.
36-
testCompile 'junit:junit:+'
43+
task docs(type: Javadoc) {
44+
source = sourceSets.main.allJava
45+
options {
46+
links("http://docs.oracle.com/javase/7/docs/api/");
47+
}
3748
}
3849

3950
jar {
40-
manifest {
41-
attributes("Implementation-Title": "Blockscore Java API"
42-
, "Implementation-Version": version
43-
, "Implementation-Vendor": "Blockscore Inc.")
44-
}
51+
manifest {
52+
attributes("Implementation-Title": "Blockscore Java API",
53+
"Implementation-Version": version,
54+
"Implementation-Vendor": "Blockscore Inc.")
55+
}
4556
}
4657

4758
test {
48-
testLogging {
49-
// Show that tests are run in the command-line output
50-
events 'started', 'passed'
51-
}
59+
testLogging {
60+
// Show that tests are run in the command-line output
61+
events 'started', 'passed'
62+
showStandardStreams true
63+
}
5264
}
5365

5466
tasks.withType(FindBugs) {
55-
reports {
56-
xml.enabled = false;
57-
html.enabled = true;
58-
}
67+
reports {
68+
xml.enabled = false;
69+
html.enabled = true;
70+
}
5971
}
6072

61-
checkstyleTest.exclude '**/src/test/**'
73+
pmd {
74+
sourceSets = [sourceSets.main]
75+
}
76+
77+
checkstyleTest.exclude '**/src/test/**'
78+
79+
80+
// Use java's linting facilities
81+
tasks.withType(JavaCompile) {
82+
options.compilerArgs << "-Xlint"
83+
}

0 commit comments

Comments
 (0)