usdol / govdatasdk
There is no license information available for the latest version (dev-master) of this package.
Composer package port for the U.S. Department of Labor's PHP SDK
dev-master
2018-10-18 02:11 UTC
This package is auto-updated.
Last update: 2024-10-18 18:57:20 UTC
README
PHP SDK to ease access to DOL's and other federal agencies' APIs. For a list of APIs that this SDK has been tested against, please see the wiki. For documentation, please see the readme. For sample code, please visit http://developer.dol.gov.
NEWS
APIv1 and Quarry API are dually supported in this release.
Instructions
To contribute samples, it is recommended to have some background on Git and GitHub.
Required files
GOVDataSDK.php is the SDK that contains the following classes:
- GOVDataContext.php: The contextual class that assembles the configuration information based on the api (V1 or Quarry)
- GOVDataRequest.php: Formats the curl request based on the context information
sample.php is the test script for GOVDataSDK
Usage
For APIv1
- Go to https://github.com/USDepartmentofLabor/PHP_DOLDataSDK.git and either GIT clone or download the zip repository
- Open the folder PHP_DOLDataSK-master and edit “sample.php”
- To edit APIv1
- Comment out the APIv2-Quarry $context variable
- Uncomment //APIv1 $context variable and replace ADD_YOUR_API_KEY_HERE with your active APIv1 key
- Enter your array arguments at line 27. (An example has been provided)
- Save and run sample.php for the output
For Quarry API
- Go to https://github.com/USDepartmentofLabor/PHP_DOLDataSDK.git and either GIT clone or download the zip repository
- Open the folder PHP_DOLDataSK-master and edit “sample.php”
- To edit Quarry APIV2
- Go to sample.php
- Comment out //APIv1 $context variable
- Uncomment //APIv2-Quarry $context variable
- Enter your array arguments at line 37 (An example has been provided)
- Save and run sample.php
Known Bugs
N/A
AUTHORS and Contact
Licenses
All of the code in this repository is public domain software.