In message <[email protected]>
          Mitch Kent <[email protected]> wrote:

>Hi all,
>
>I'm playing with the Android mobile platform, and with it being a 
>smaller screen obviously I can't really squeeze everything I'd like on 
>the page. For that reason, and just because I think it should, I was 
>planing to link back to the original TWFY site for the MP in question.
>
>Having a look at the new(ish*) twfy page, I'm not really sure how I can 
>get to an MP's page programatically. I have anything a json request from 
>the api would return, such as the mp id or the original postcode used to 
>search... is there a way to build a url such that 
>theyworkforyou.com/mp/se11aa.html or similar will get me to the mp's 
>page? Otherwise is there a systematic way to change the name/district 
>into a format to get to that page? (looks like 
>theyworkforyou.com/mp/firstname_lastname/consituency but with spaces 
>replaced with underscores... is that true for all results?)
>
>*haven't looked in a while, don't know how long its been like that. Nice 
>though :)
>
>Cheers,
>Mitch.


I've done an MP info page from postcode which you can see at

<http://kevsoft.co.uk/mp/result.php>

Just enter a valid post code to get info about that MP.

One of the things that it receives from the TheyWorkForYou API is
memberid which would give:

http://theyworkforyou.com/mp/?m=1550

That would give you my MP.

http://theyworkforyou.com/mp/?m=1503

Would give you the MP for the Queen.


-- 
Kev Wells  http://riscos.kevsoft.co.uk/
http://kevsoft.co.uk/   http://kevsoft.co.uk/AleQuest/
ICQ 238580561
So many beers so little time.

_______________________________________________
Mailing list [email protected]
Archive, settings, or unsubscribe:
https://secure.mysociety.org/admin/lists/mailman/listinfo/developers-public

Reply via email to