(self, category=None, replace=False, **kwargs)
return self.__atom_category
Get or set categories that the feed belongs to.

        This method can be called with:

        - the fields of a category as keyword arguments
        - the fields of a category as a dictionary
        - a list of dictionaries containing the category fields

        A categories has the following fields:

        - *term* identifies the category
        - *scheme* identifies the categorization scheme via a URI.
        - *label* provides a human-readable label for display

        If a label is present it is used for the RSS feeds. Otherwise the term
        is used. The scheme is used for the domain attribute in RSS.

        :param link:    Dict or list of dicts with data.
        :param replace: Add or replace old data.
        :returns: List of category data.
Get or set categories that the feed belongs to.
Get or set categories that the feed belongs to .
def category(self, category=None, replace=False, **kwargs):
        '''Get or set categories that the feed belongs to.

        This method can be called with:

        - the fields of a category as keyword arguments
        - the fields of a category as a dictionary
        - a list of dictionaries containing the category fields

        A categories has the following fields:

        - *term* identifies the category
        - *scheme* identifies the categorization scheme via a URI.
        - *label* provides a human-readable label for display

        If a label is present it is used for the RSS feeds. Otherwise the term
        is used. The scheme is used for the domain attribute in RSS.

        :param link:    Dict or list of dicts with data.
        :param replace: Add or replace old data.
        :returns: List of category data.
        '''
        if category is None and kwargs:
            category = kwargs
        if category is not None:
            if replace or self.__atom_category is None:
                self.__atom_category = []
            self.__atom_category += ensure_format(
                    category,
                    set(['term', 'scheme', 'label']),
                    set(['term']))
            # Map the ATOM categories to RSS categories. Use the atom:label as
            # name or if not present the atom:term. The atom:scheme is the
            # rss:domain.
            self.__rss_category = []
            for cat in self.__atom_category:
                rss_cat = {}
                rss_cat['value'] = cat.get('label', cat['term'])
                if cat.get('scheme'):
                    rss_cat['domain'] = cat['scheme']
                self.__rss_category.append(rss_cat)
        return self.__atom_category
def category ( self , category = None , replace = False , * * kwargs ) : if category is None and kwargs : category = kwargs if category is not None : if replace or self . __atom_category is None : self . __atom_category = [ ] self . __atom_category += ensure_format ( category , set ( [ 'term' , 'scheme' , 'label' ] ) , set ( [ 'term' ] ) ) # Map the ATOM categories to RSS categories. Use the atom:label as # name or if not present the atom:term. The atom:scheme is the # rss:domain. self . __rss_category = [ ] for cat in self . __atom_category : rss_cat = { } rss_cat [ 'value' ] = cat . get ( 'label' , cat [ 'term' ] ) if cat . get ( 'scheme' ) : rss_cat [ 'domain' ] = cat [ 'scheme' ] self . __rss_category . append ( rss_cat ) return self . __atom_category