alphagov/gds-api-adapters — pull request #106 by JordanHatch (2014-01-06 12:08:31+00:00)
Title: Allow tag_type to be provided to all tag methods in the Content API helper

At the moment, the tag methods in the Content API adapter rely on legacy behaviour in the Content API, where no tag types are specified and requests fall back to looking up tags of the `section` type.

In the future, we'd like to introduce the use of other tag types and, whilst the Content API supports this, the adapter does not.

This pull request changes the four tag methods so that the tag type can be provided as an additional argument to each method. If no tag type is provided, the existing behaviour is maintained, making this a non-breaking change.

I've also added some missing tests for the methods which request a curated list of artefacts for a tag, or which request artefacts for a tag in a custom sort order.