sunlightlabs/openstates — Issue #108: [iOS] Drilled down legislator info url as an attribute
Author: grgcombs
Created: 2011-11-10 23:05:35+00:00
State: open

Prior to shipping the iOS app, (and thus *prior to V2 of the API*), would it be possible to add an additional attribute to legislator results?

This isn't possible in every case, but for many states the legislator's "sources" URL points to an aggregate directory page for the whole chamber, and the scraping is done on the legislator's individual page (i.e., one level down in the website's directory tree). Can we get an additional attribute to the legislator's API results that provides the url for that specific member's webpage?

So, in the case of Iowa, you'd now see something like this:

```javascript
"sources" : [
{
"url": "http://www.legis.iowa.gov/Legislators/senate.aspx" // unaltered
}
],
"webpage": "http://www.legis.iowa.gov/Legislators/legislator.aspx?GA=84&PID=141", // new

// Or, alternatively just do this ...

"sources" : [
{
"url": "http://www.legis.iowa.gov/Legislators/senate.aspx",
"name": "chamber"
},
{
"url": "http://www.legis.iowa.gov/Legislators/legislator.aspx?GA=84&PID=141",
"name": "member"
}
]
```