An open API service indexing awesome lists of open source software.

https://github.com/odinshat/twfy-php

An up-to-date but simple wrapper to the TheyWorkForYouAPI
https://github.com/odinshat/twfy-php

api api-client php-library php-sdk php7 politics sdk society

Last synced: 3 months ago
JSON representation

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

Awesome Lists containing this project

README

          

# TheyWorkForYou PHP SDK

## twfy-php

An up-to-date, simple wrapper to the [TheyWorkForYouAPI](https://theyworkforyou.org) written in PHP.

It can be easily installed using [Composer](https://getcomposer.org) 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:

```php
$twfyapi = new TWFYAPI('DpPSWnGj7XPRGePtfMGWvGqQ');

$mps = $twfyapi->query('getMPs', array('output' => 'xml', 'party' => 'labour'));

header('Content-type: application/xml');
echo $mps;
```