'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
    tv_categories = []
    if (not name):
        error += u'\nNo    Provider    Name    specified'
    if (not url):
        error += u'\nNo    Provider    Url    specified'
    if (not key):
        error += u'\nNo    Provider    Api    key    specified'
    if (not error):
        tempProvider = NewznabProvider(name, url, True, key)
        (success, tv_categories, error) = tempProvider.get_newznab_categories()
    return json_encode({u'success': success, u'tv_categories': tv_categories, u'error': error})
