Jeffrey C Reinecke [email protected], Amy Zou [email protected]
©2015-2016, Whitepages Inc.
The native Java client library to Whitepages PROAPI.
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());
}
}
This library depends on the following resources:
This library has been tested against Jackson 2.4.4, 2.5.3, and 2.7.3.
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
To run the tests, use
sbt test
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.
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.
See LICENSE.txt