(self, link=None, replace=False, **kwargs)
return self.__atom_link
Get or set link data. An link element is a dict with the fields
        href, rel, type, hreflang, title, and length. Href is mandatory for
        ATOM.

        This method can be called with:

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

        A link has the following fields:

        - *href* is the URI of the referenced resource (typically a Web page)
        - *rel* contains a single link relationship type. It can be a full URI,
          or one of the following predefined values (default=alternate):

            - *alternate* an alternate representation of the entry or feed, for
              example a permalink to the html version of the entry, or the
              front page of the weblog.
            - *enclosure* a related resource which is potentially large in size
              and might require special handling, for example an audio or video
              recording.
            - *related* an document related to the entry or feed.
            - *self* the feed itself.
            - *via* the source of the information provided in the entry.

        - *type* indicates the media type of the resource.
        - *hreflang* indicates the language of the referenced resource.
        - *title* human readable information about the link, typically for
          display purposes.
        - *length* the length of the resource, in bytes.

        RSS only supports one link with URL only.

        :param link:    Dict or list of dicts with data.
        :param replace: If old links are to be replaced (default: False)
        :returns:       Current set of link data

        Example::

            >>> feedgen.link( href='http://example.com/', rel='self')
            [{'href':'http://example.com/', 'rel':'self'}]
Get or set link data. An link element is a dict with the fields
        href, rel, type, hreflang, title, and length. Href is mandatory for
        ATOM.
Get or set link data . An link element is a dict with the fields href rel type hreflang title and length . Href is mandatory for ATOM .
def link(self, link=None, replace=False, **kwargs):
        '''Get or set link data. An link element is a dict with the fields
        href, rel, type, hreflang, title, and length. Href is mandatory for
        ATOM.

        This method can be called with:

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

        A link has the following fields:

        - *href* is the URI of the referenced resource (typically a Web page)
        - *rel* contains a single link relationship type. It can be a full URI,
          or one of the following predefined values (default=alternate):

            - *alternate* an alternate representation of the entry or feed, for
              example a permalink to the html version of the entry, or the
              front page of the weblog.
            - *enclosure* a related resource which is potentially large in size
              and might require special handling, for example an audio or video
              recording.
            - *related* an document related to the entry or feed.
            - *self* the feed itself.
            - *via* the source of the information provided in the entry.

        - *type* indicates the media type of the resource.
        - *hreflang* indicates the language of the referenced resource.
        - *title* human readable information about the link, typically for
          display purposes.
        - *length* the length of the resource, in bytes.

        RSS only supports one link with URL only.

        :param link:    Dict or list of dicts with data.
        :param replace: If old links are to be replaced (default: False)
        :returns:       Current set of link data

        Example::

            >>> feedgen.link( href='http://example.com/', rel='self')
            [{'href':'http://example.com/', 'rel':'self'}]

        '''
        if link is None and kwargs:
            link = kwargs
        if link is not None:
            if replace or self.__atom_link is None:
                self.__atom_link = []
            self.__atom_link += ensure_format(
                link,
                set(['href', 'rel', 'type', 'hreflang', 'title', 'length']),
                set(['href']),
                {'rel': [
                    'about', 'alternate', 'appendix', 'archives', 'author',
                    'bookmark', 'canonical', 'chapter', 'collection',
                    'contents', 'copyright', 'create-form', 'current',
                    'derivedfrom', 'describedby', 'describes', 'disclosure',
                    'duplicate', 'edit', 'edit-form', 'edit-media',
                    'enclosure', 'first', 'glossary', 'help', 'hosts', 'hub',
                    'icon', 'index', 'item', 'last', 'latest-version',
                    'license', 'lrdd', 'memento', 'monitor', 'monitor-group',
                    'next', 'next-archive', 'nofollow', 'noreferrer',
                    'original', 'payment', 'predecessor-version', 'prefetch',
                    'prev', 'preview', 'previous', 'prev-archive',
                    'privacy-policy', 'profile', 'related', 'replies',
                    'search', 'section', 'self', 'service', 'start',
                    'stylesheet', 'subsection', 'successor-version', 'tag',
                    'terms-of-service', 'timegate', 'timemap', 'type', 'up',
                    'version-history', 'via', 'working-copy', 'working-copy-of'
                    ]})
            # RSS only needs one URL. We use the first link for RSS:
            if len(self.__atom_link) > 0:
                self.__rss_link = self.__atom_link[-1]['href']
        # return the set with more information (atom)
        return self.__atom_link
def link ( self , link = None , replace = False , * * kwargs ) : if link is None and kwargs : link = kwargs if link is not None : if replace or self . __atom_link is None : self . __atom_link = [ ] self . __atom_link += ensure_format ( link , set ( [ 'href' , 'rel' , 'type' , 'hreflang' , 'title' , 'length' ] ) , set ( [ 'href' ] ) , { 'rel' : [ 'about' , 'alternate' , 'appendix' , 'archives' , 'author' , 'bookmark' , 'canonical' , 'chapter' , 'collection' , 'contents' , 'copyright' , 'create-form' , 'current' , 'derivedfrom' , 'describedby' , 'describes' , 'disclosure' , 'duplicate' , 'edit' , 'edit-form' , 'edit-media' , 'enclosure' , 'first' , 'glossary' , 'help' , 'hosts' , 'hub' , 'icon' , 'index' , 'item' , 'last' , 'latest-version' , 'license' , 'lrdd' , 'memento' , 'monitor' , 'monitor-group' , 'next' , 'next-archive' , 'nofollow' , 'noreferrer' , 'original' , 'payment' , 'predecessor-version' , 'prefetch' , 'prev' , 'preview' , 'previous' , 'prev-archive' , 'privacy-policy' , 'profile' , 'related' , 'replies' , 'search' , 'section' , 'self' , 'service' , 'start' , 'stylesheet' , 'subsection' , 'successor-version' , 'tag' , 'terms-of-service' , 'timegate' , 'timemap' , 'type' , 'up' , 'version-history' , 'via' , 'working-copy' , 'working-copy-of' ] } ) # RSS only needs one URL. We use the first link for RSS: if len ( self . __atom_link ) > 0 : self . __rss_link = self . __atom_link [ - 1 ] [ 'href' ] # return the set with more information (atom) return self . __atom_link