Skip to content

An up-to-date but simple wrapper to the TheyWorkForYouAPI

License

Notifications You must be signed in to change notification settings

OdinsHat/twfy-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TheyWorkForYou PHP SDK

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;