'Retrieves a list of possible categories with category id\'s
Using the default url/api?cat
http://yournewznaburl.com/api?t=caps&apikey=yourapikey'

@staticmethod
def getNewznabCategories(name, url, key):

    error = u''
    success = False
    if (not name):
        error += (u'\n' + _(u'No    Provider    Name    specified'))
    if (not url):
        error += (u'\n' + _(u'No    Provider    Url    specified'))
    if (not key):
        error += (u'\n' + _(u'No    Provider    Api    key    specified'))
    if error:
        return json.dumps({u'success': False, u'error': error})
    tempProvider = newznab.NewznabProvider(name, url, key)
    (success, tv_categories, error) = tempProvider.get_newznab_categories()
    return json.dumps({u'success': success, u'tv_categories': tv_categories, u'error': error})
