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
- Host: GitHub
- URL: https://github.com/odinshat/twfy-php
- Owner: OdinsHat
- License: bsd-3-clause
- Created: 2021-08-21T08:42:03.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-27T09:52:53.000Z (over 4 years ago)
- Last Synced: 2025-01-20T13:21:30.202Z (about 1 year ago)
- Topics: api, api-client, php-library, php-sdk, php7, politics, sdk, society
- Language: PHP
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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;
```