opds-ts - v1.0.3
    Preparing search index...

    Class Entry

    An entry in an OPDS feed.

    Index

    Constructors

    • Creates a new Entry instance.

      Parameters

      Returns Entry

    • Creates a new Entry instance with id and title.

      Parameters

      • id: string

        The unique identifier for the entry.

      • title: string

        The title of the entry.

      Returns Entry

    Methods

    • Adds an acquisition link to the entry. This is a convenience method for adding an acquisition link with the appropriate rel. If openAccess is true, the rel will be set to open-access.

      Parameters

      • href: string

        The URL of the acquisition link.

      • type: string

        The type of the acquisition link (e.g., application/epub+zip or application/x-cbz).

      • openAccess: boolean = false

        Whether the acquisition is open access.

      Returns Entry

      The Entry instance (for chaining).

    • Adds extra metadata to the entry.

      Parameters

      • key: string

        The key for the extra metadata.

      • value: any

        The value for the extra metadata.

      Returns Entry

      The Entry instance (for chaining).

    • Adds an image link to the entry. This is a convenience method for adding an image link with the appropriate rel and type. The image is assumed to be a JPEG.

      Parameters

      • href: string

        The URL of the image.

      • type: string = 'image/jpeg'

      Returns Entry

      The Entry instance (for chaining).

    • Adds one or more links to the feed.

      Parameters

      • ...links: Link[]

        The links to add.

      Returns Entry

      The Feed instance (for chaining).

    • Adds multiple links to the entry.

      Parameters

      • links: Link[]

        The links to add.

      Returns Entry

      The Entry instance (for chaining).

    • Adds a page stream link to the entry. This is a convenience method for adding a page stream link with the appropriate rel and properties. This is using the OPDS Page Stream Extension.

      Parameters

      • href: string

        The URL of the page stream link. (Replaces {pageNumber} with the actual page number when requesting a specific page.)

      • type: string

        The type of the page stream link (e.g., image/jpeg).

      • pageCount: number

        The total number of pages in the resource.

      Returns Entry

      The Entry instance (for chaining).

    • Adds a subsection link to the entry. This is a convenience method for adding a subsection link with the appropriate rel and type. This is used to link to a subsection feed (e.g. a category or collection).

      Parameters

      • href: string

        The URL of the subsection.

      • kind: FeedKind

        The kind of the feed (navigation or acquisition).

      Returns Entry

      The Entry instance (for chaining).

    • Adds a thumbnail link to the entry. This is a convenience method for adding a thumbnail link with the appropriate rel and type. The thumbnail is assumed to be a JPEG.

      Parameters

      • href: string

        The URL of the thumbnail image.

      • type: string = 'image/jpeg'

      Returns Entry

      The Entry instance (for chaining).

    • Sets the author of the entry.

      Parameters

      • author: string

        The author's name.

      Returns Entry

      The Entry instance (for chaining).

    • Sets the content of the entry.

      Parameters

      • content: { type?: string; value: string }

        The content object with type and value.

      Returns Entry

      The Entry instance (for chaining).

    • Sets the summary of the entry.

      Parameters

      • summary: string

        The summary text.

      Returns Entry

      The Entry instance (for chaining).

    • Sets the updated date of the entry.

      Parameters

      • updated: string

        The updated date in ISO 8601 format.

      Returns Entry

      The Entry instance (for chaining).

    • Converts the entry to XML string.

      Parameters

      • __namedParameters: { baseUrl?: string; prettyPrint?: boolean } = {}

      Returns string

      XML string representing the entry