odinshat / twfy-php
A simple wrapper library for the TheyWorkForYouAPI
v1.0.1
2021-08-27 09:51 UTC
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- roave/security-advisories: dev-latest
- squizlabs/php_codesniffer: ^3.6
- vimeo/psalm: ^4.9
This package is auto-updated.
Last update: 2025-02-26 20:11:51 UTC
README
twfy-php
An up-to-date, simple wrapper to the TheyWorkForYouAPI written in PHP.
It can be easily installed using Composer with the following command:
composer require odinshat/twfy-php
After that you can use it in you project by simply including it with:
use OdinsHat\Twfy
Then here's a basic example:
$twfyapi = new TWFYAPI('DpPSWnGj7XPRGePtfMGWvGqQ'); $mps = $twfyapi->query('getMPs', array('output' => 'xml', 'party' => 'labour')); header('Content-type: application/xml'); echo $mps;