Git Product home page Git Product logo

proapi-client-java's Introduction

Whitepages PROAPI Client Library

Jeffrey C Reinecke [email protected], Amy Zou [email protected]

©2015-2016, Whitepages Inc.

Description

The native Java client library to Whitepages PROAPI.

Getting Started

A short example

Client client = new Client(ClientIntegrationTestHelper.getApiKey());

PersonQuery personQuery = new PersonQuery("Rory", null, "Williams", "Seattle", "WA", "98101");

Response<Person> response = null;
try {
    response = client.findPeople(personQuery);
} catch (FindException e) {
    e.printStackTrace();
}

if (response != null && response.isSuccess()) {
    List<Person> results = response.getResults();
    for (Person p : results) {
        System.out.println(p.getBestName());
    }
}

Dependencies

This library depends on the following resources:

This library has been tested against Jackson 2.4.4, 2.5.3, and 2.7.3.

Compiling the Repo

This repository is managed by sbt. You can compile using:

sbt compile

This will download the Jackson dependency jars, and compile the sources to class files.

To assemble into a jar file that does not contain dependency jars, use:

sbt package

Running Test

To run the tests, use

sbt test

Compiling Documentation

To compile the JavaDoc documentation, use:

sbt doc

Changes to the project Github.io Documentation should be committed to the gh-pages branch. This typically involves copying the compiled documentation directory into the project, replacing the existing javadocs directory, when in the gh-pages branch.

Class Structure Overview

The starting point for all interactions is the class Client. Once a Client instance is obtained, the appropriate find method can be given a Query instance. It returns a Response instance that contains a result list and a messages list.

The result list contains zero or more Entity instances of the appropriate type. Entities have accessors for retrieving lists of Association instances by Entity type (e.g. Person, Phone, etc). Associations can be followed to retrieve their associated entities.

The messages list, though usually empty, may contain Message instances. Note that many errors that may occur are given here as messages with severity error.

License

See LICENSE.txt

proapi-client-java's People

Contributors

adroit24 avatar anthonyrstevens avatar jaredk-porch avatar paploo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.