TheyWorkForYou.com API Bindings for PHP and ASP.NET
TheyWorkForYou.com is a "non-partisan, volunteer-run website which aims to make it easy for people to keep tabs on their elected and unelected representatives in Parliament."
The API allows access to information contained in the web site including lists of politicians, constituencies and Hansard content. Bindings allow easy access to retrieve data in the relevant programming language. Bindings for Ruby, Perl, Python and Java are available from the API site, and below are bindings for PHP and ASP.NET, two commonly-used languages in web programming.
Both bindings are currently on version 1.5, released on 06/08/2009 and support all API calls.
NOTE: All bindings require API keys to access the TheyWorkForYou.com API. Dropping these bindings into an existing application designed before the introduction of API keys will break it until you amend your code and provide a valid key.
PHP binding
The PHP API binding allows easy access to the API for applications written in PHP. It requires a minimum of PHP 5 and cURL to be installed.
The PHP binding is very easy to use. Here is an example which uses the binding to get a list of all Labour MPs in the House of Commons from the API in XML format. You can also see it in action.
ASP.NET binding
The ASP.NET API binding allows easy access to the API for applications written in ASP.NET/C#. Since it is written in C#, it can be run either under Windows/IIS or Linux/Mono without any modifications.
The ASP.NET binding is very easy to use. Here is an example which uses the binding to get a list of all Labour MPs in the House of Commons from the API in XML format.
OpenAustralia.org API Bindings for PHP and ASP.NET
OpenAustralia.org is a "non-partisan website run by a group of volunteers which aims to make it easy for people to keep tabs on their representatives in Parliament."
The API allows access to information contained in the web site including lists of politicians and Hansard content. Bindings allow easy access to retrieve data in the relevant programming language. Below are bindings for PHP and ASP.NET, two commonly-used languages in web programming.
Both bindings are currently on version 1.0, released on 06/08/2009 and support all API calls.
NOTE: All bindings require API keys to access the OpenAustralia.org API. Dropping these bindings into an existing application designed before the introduction of API keys will break it until you amend your code and provide a valid key.
PHP binding
The PHP API binding allows easy access to the API for applications written in PHP. It requires a minimum of PHP 5 and cURL to be installed.
The PHP binding is very easy to use. Here is an example which uses the binding to get a list of all Labour MPs in the House of Commons from the API in XML format. You can also see it in action.
ASP.NET binding
The ASP.NET API binding allows easy access to the API for applications written in ASP.NET/C#. Since it is written in C#, it can be run either under Windows/IIS or Linux/Mono without any modifications.
The ASP.NET binding is very easy to use. Here is an example which uses the binding to get a list of all Labour MPs in the House of Commons from the API in XML format.
Have any questions or bug reports? Contact me.
