Download the PHP package wiserwebsolutions/laravel-lobbyist-legiscan without Composer
On this page you can find all versions of the php package wiserwebsolutions/laravel-lobbyist-legiscan. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wiserwebsolutions/laravel-lobbyist-legiscan
More information about wiserwebsolutions/laravel-lobbyist-legiscan
Files in wiserwebsolutions/laravel-lobbyist-legiscan
Package laravel-lobbyist-legiscan
Short Description Default nationwide LegiScan API driver for the laravel-lobbyist package.
License MIT
Informations about the package laravel-lobbyist-legiscan
Laravel Lobbyist — LegiScan Driver
The default nationwide driver for wiserwebsolutions/laravel-lobbyist,
backed by the LegiScan API. It provides
legislative data for all 50 states and the federal government and registers
itself with the Lobbyist manager under the legiscan name (the default driver).
Installation
The package auto-registers. Publish its config if you want to tune requests or caching:
Configuration
Set your LegiScan API key in .env:
Responses are cached per operation (sessions/people for a day, bills/roll calls for an hour) via the configured cache store.
Usage
Supported capabilities
LegiScan supports every capability except ListVotes — the API has no cheap
"all votes for a state" operation (roll calls are reached per bill or by id), so
this driver implements VoteLookup (vote($id)) but not VoteProvider.
Bulk Datasets
Beyond per-record calls, LegiScan publishes a full session archive (every bill, roll call with per-member positions, and legislator) as a single download — dramatically cheaper against a metered key than importing a session bill by bill:
Reusing downloaded archives
Archives run to tens of megabytes and are streamed to disk rather than
buffered or response-cached. During local development — where the importing
database gets wiped and rebuilt far more often than LegiScan actually
republishes a session — it's often wasteful to re-download the same archive on
every run. Enable reuse_existing to skip the download when a file from a
previous run is already on disk for that session and dataset hash:
A cached archive is only ever reused for the exact hash it was downloaded for — once LegiScan republishes the session under a new hash, it downloads fresh automatically.
To clear the local cache entirely (e.g. after wiping your database), call:
Testing
Tests use Http::fake() and never hit the network:
License
MIT © Daniel Wiser
All versions of laravel-lobbyist-legiscan with dependencies
illuminate/support Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
spatie/laravel-data Version ^4.20
wiserwebsolutions/laravel-lobbyist Version *