The DataRole API Client Library enables you to work with DataRole APIs on your server.
https://github.com/DataRole/api
You can download the package in its entirety. The Releases page lists all stable versions. Download any file with the name for a package including this library and its dependencies.
Uncompress the zip file you download, and include the autoloader in your project:
require_once '/path/to/datarole-api-php-client/vendor/autoload.php';
Begin by editing the examples/index.php file and replacing the placeholder text with your provided account and secret keys. If you want to test a specific address, just replace the default address in the lookupAddress() function.
// include your composer dependencies
require_once 'vendor/autoload.php';
$client = new DataRole\API\Client([
'account' => '__ACCOUNT__',
'secret' => '__SECRET__',
'version' => 'v2',
]);
$client
->lookupAddress('776+Buena+Vista+Ave+Alameda+CA+94501')
->printPreview();
You can then view the result in your browser by running the php built-in web server and then browsing to the host and port you specified (ie: http://localhost:8000
).
$ php -S localhost:8000 -t examples/
For support with the library the best place to ask is via the datarole-api-php-client tag on StackOverflow: http://stackoverflow.com/questions/tagged/datarole-api-php-client
If there is a specific bug with the library, please file an issue in the Github issues tracker, including a (minimal) example of the failing code and any specific errors retrieved.
We accept contributions via Github Pull Requests, but all contributors need to be covered by the standard Apache Individual Contributor License Agreement: https://www.apache.org/licenses/icla.txt
Run the PHPUnit tests with PHPUnit.
phpunit tests/
Copyright 2016 DataRole, LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.