'GET /api/tool_shed/category
Display a list of repositories in the selected category.
:param tool_shed_url: the url of the toolshed to get repositories from
:param category_id: the category to get repositories from'

@expose_api
@web.require_admin
def category(self, trans, **kwd):

    tool_shed_url = urlunquote(kwd.get('tool_shed_url', ''))
    category_id = kwd.get('category_id', '')
    params = dict(installable=True)
    tool_shed_url = common_util.get_tool_shed_url_from_tool_shed_registry(trans.app, tool_shed_url)
    url = util.build_url(tool_shed_url, pathspec=['api', 'categories', category_id, 'repositories'], params=params)
    repositories = []
    return_json = json.loads(util.url_get(url))
    for repository in return_json['repositories']:
        api_url = web.url_for(controller='api/tool_shed', action='repository', tool_shed_url=urlquote(tool_shed_url), repository_id=repository['id'], qualified=True)
        repository['url'] = api_url
        repositories.append(repository)
    return_json['repositories'] = repositories
    return return_json
