alphagov/govuk_content_api — pull request #11 by KushalP (2012-09-10 18:45:51+00:00)
Title: Local authorities can be queried through the API

LocalAuthority objects should be queryable with a specific (unique) and searchable in the event that a name match would suffice. This commit allows doing both.

The unique field for a LocalAuthority is the snac code, which is why there's a direct route in the form of /local_authority/snac_code.json. However it's also possible to do a partial search of a snac code using
the /local_authorities.json slug.

Similarly, it's possible to search for council names using the /local_authorities.json slug. This can be done both partially or directly.