opds-ts - v2.1.0
    Preparing search index...

    Class Feed

    Index

    Constructors

    Methods

    • Adds multiple entries to the feed.

      Parameters

      • entries: Entry[]

        The entries to add.

      Returns Feed

      The Feed instance (for chaining).

    • Adds one or more entries to the feed.

      Parameters

      • ...entries: Entry[]

        The entries to add.

      Returns Feed

      The Feed instance (for chaining).

    • Adds extra fields to the feed.

      Parameters

      • key: string

        The key of the extra field.

      • value: any

        The value of the extra field.

      Returns Feed

      The Feed instance (for chaining).

    • Adds one or more links to the feed.

      Parameters

      • ...links: Link[]

        The links to add.

      Returns Feed

      The Feed instance (for chaining).

    • Adds multiple links to the entry.

      Parameters

      • links: Link[]

        The links to add.

      Returns Feed

      The Entry instance (for chaining).

    • Adds a navigation link to the feed with the specified rel attribute. If a navigation link with the same rel already exists, it will be replaced.

      Parameters

      • rel: NavigationRel

        The relationship type ('start', 'previous', 'next', 'last', 'first').

      • href: string

        The URL of the link.

      Returns Feed

      The Feed instance (for chaining).

    • Adds multiple navigation links to the feed. If navigation links with the same rel already exist, they will be replaced.

      Parameters

      • links: Partial<Record<NavigationRel, string>>

        Object with navigation link types as keys and URLs as values.

      Returns Feed

      The Feed instance (for chaining).

    • Adds a self link to the feed. This is a convenience method for adding a self link with the appropriate rel and type.

      Parameters

      • href: string

        The URL of the feed.

      • Optionalkind: FeedKind

        The kind of the feed (navigation or acquisition).

      Returns Feed

      The Feed instance (for chaining).

    • Gets the author of the feed.

      Returns undefined | string

      The author of the feed.

    • Gets the current entries in the feed.

      Returns Entry[]

      The array of entries.

    • Gets the ID of the feed.

      Returns string

      The ID of the feed.

    • Gets the kind of the feed.

      Returns undefined | FeedKind

      The kind of the feed.

    • Gets the language of the feed.

      Returns undefined | string

      The language of the feed.

    • Gets the current links in the entry.

      Returns Link[]

      The array of links.

    • Gets a navigation link from the feed by its rel attribute.

      Parameters

      • rel: NavigationRel

        The relationship type ('start', 'previous', 'next', 'last', 'first').

      Returns undefined | Link

      The navigation link, or undefined if not found.

    • Gets the self link of the feed.

      Returns undefined | Link

      The self link, or undefined if not found.

    • Gets the title of the feed.

      Returns string

      The title of the feed.

    • Gets the updated date of the feed.

      Returns undefined | string

      The updated date in ISO 8601 format.

    • Sets the author of the feed.

      Parameters

      • author: string

        The author of the feed.

      Returns Feed

      The Feed instance (for chaining).

    • Sets the kind of the feed.

      Parameters

      • kind: FeedKind

        The kind of the feed (e.g., 'navigation', 'acquisition').

      Returns Feed

      The Feed instance (for chaining).

    • Sets the language of the feed.

      Parameters

      • lang: string

        The language of the feed. (e.g. 'en', 'de', etc.)

      Returns Feed

      The Feed instance (for chaining).

    • Sets the updated date of the feed.

      Parameters

      • updated: string

        The updated date in ISO 8601 format.

      Returns Feed

      The Feed instance (for chaining).

    • Creates a Feed instance from an XML string.

      Parameters

      • xmlString: string

        The XML string representing a feed.

      Returns Feed

      A new Feed instance.