Download the PHP package andylolz/everypolitician without Composer
On this page you can find all versions of the php package andylolz/everypolitician. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download andylolz/everypolitician
More information about andylolz/everypolitician
Files in andylolz/everypolitician
Package everypolitician
Short Description PHP package for easy access to EveryPolitician data
License MIT
Homepage https://github.com/andylolz/everypolitician-php
Informations about the package everypolitician
everypolitician-php
A PHP library for easy access to EveryPolitician data. This is essentially a port of everypolitician-python, which is itself a port of everypolitican-ruby.
Install
Via Composer
Usage
Creating an instance of the EveryPolitican class allows you to access information on countries, their legislatures and legislative periods. Each country and legislature has a slug that can be used to reference them via the country and legislature methods:
By default this will get the EveryPolitician data and returns the most recent data. This data is found from the index file, called countries.json
, which links to specific versions of other data files.
If you want want to point to a different countries.json
file, you can override the default URL using ::fromUrl
:
The example above is using a specific commit (indicated by the hash 080cb46
). If you want to use a local copy of countries.json
you can instead create the object using the ::fromFilename
method, e.g.:
For more about countries.json
, see this description.
Remember that EveryPolitician data is frequently updated — see this information about using EveryPolitician data.
More information on the EveryPolitician site.
Change log
Please see CHANGELOG for information on what has changed recently.
Testing
Contributing
Please see CONDUCT for details.
Credits
License
The MIT License (MIT). Please see License File for more information.
All versions of everypolitician with dependencies
guzzlehttp/guzzle Version ^6.0
andylolz/everypolitician-popolo Version ^0.0.3
league/csv Version ^8.0