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

@expose_api
def show(self, trans, **kwd):

    tool_shed_url = urlunquote(kwd.get('tool_shed_url', ''))
    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'])
    categories = []
    for category in json.loads(util.url_get(url)):
        api_url = web.url_for(controller='api/tool_shed', action='category', tool_shed_url=urlquote(tool_shed_url), category_id=category['id'], qualified=True)
        category['url'] = api_url
        categories.append(category)
    return categories
