Download the PHP package cnizzardini/gov-info without Composer
On this page you can find all versions of the php package cnizzardini/gov-info. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cnizzardini/gov-info
More information about cnizzardini/gov-info
Files in cnizzardini/gov-info
Package gov-info
Short Description Library for using api.govinfo.gov
License MIT
Homepage https://github.com/cnizzardini/gov-info
Informations about the package gov-info
GOVINFO: PHP library for accessing api.govinfo.gov
This alpha stage package provides a very simple way to access api.govinfo.gov
See console demo
Install
You can install this package via composer.
Usage
Retrieve an index of all collections available
After running this code $result
will contain a non-truncated version of collections:
Retrieve all packages in a collection
After running this code $result
will contain a non-truncated version of packages:
Retrieve a specific package in a collection.
After running this code $result
will contain the requested package
Retrieve a summary of a package.
After running this code $result
will contain a non-truncated version of the package summary
Retrieve a package as a specified content-type
After running this code $result
will be an instance of GuzzleHttp\Psr7\Response
For additional usage examples, please look at src/Console
and tests
.
Console
There is a minimalist console application that can be used, but its not designed for production use.
I built this so I could easily regression test the library against the production API. Each command
will prompt you for an API key. To avoid this prompt you can create a local apiKey.txt
file with your
API key in there.
Testing
License
The MIT License (MIT). Please see License File for more information.
All versions of gov-info with dependencies
ext-json Version *
guzzlehttp/guzzle Version ~6.0
symfony/console Version ^5.0