Skip to content

BlockScore/blockscore-java

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

blockscore-java Circle CI

This is the official library for Java clients of the BlockScore API. Click here to read the full documentation including code examples.

Requirements

  • Java 1.7 and later

Installation

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>com.blockscore</groupId>
  <artifactId>blockscore-java</artifactId>
  <version>4.0.2</version>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile 'com.blockscore:blockscore-java:4.0.2'

Others

You can download our JAR files from here: https://github.com/BlockScore/blockscore-java/releases

Or, alternatively, build from source by

  1. Cloning this repo
  2. ./gradlew :build
  3. ./gradlew :jar (Builds the standard JAR) or ./gradlew :fatJar (Builds the plug and play jar)

Usage

import com.blockscore.models.Address;
import com.blockscore.models.Person;
import com.blockscore.net.BlockscoreApiClient;

import java.text.SimpleDateFormat;
import java.util.Date;

BlockscoreApiClient client = new BlockscoreApiClient("your api key here");

Address address = new Address();
address.setStreet1("1 Infinite Loop")
       .setStreet2("Apt 6")
       .setCity("Cupertino")
       .setSubdivision("CA")
       .setPostalCode("95014")
       .setCountryCode("US");

SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
Date dateOfBirth = dateOfBirth = formatter.parse("1980-08-23");

Person.Builder builder = new Person.Builder(client);
builder.setFirstName("John")
       .setMiddleName("Pearce")
       .setLastName("Doe")
       .setDocumentType("ssn")
       .setDocumentValue("0000")
       .setAddress(address)
       .setDateOfBirth(dateOfBirth);

Person person = builder.create();