opds library

OPDS catalog parsing: Atom 1.x feeds and OPDS 2.0 JSON catalogs.

Unseal interprets catalog documents only. Fetching, authentication, purchases, loans, and DRM belong to the host application.

Classes

Opds2AcquisitionObject
One expected type acquired after additional (indirect) steps.
Opds2AltIdentifier
One alternate identifier: a raw value or a value with its scheme URI.
Opds2Availability
Availability state of an acquisition link.
Opds2Contributor
A person or organization contributing to a feed or publication.
Opds2Copies
Copy availability of a library acquisition link.
Opds2Encryption
Encryption information attached to a link.
Opds2Facet
One facet group of a feed.
Opds2Feed
A parsed OPDS 2.0 feed: navigation, publications, groups, facets, and named subcollections under one metadata and link set.
Opds2FeedMetadata
Metadata of a feed, facet, or group (the OPDS feed metadata subset).
Opds2Group
A curated group of a feed: navigation links, publications, or both.
Opds2Holds
Hold-list information of a library acquisition link.
Opds2Limits
Resource bounds for OPDS 2.0 parsing.
A link target: href is kept exactly as written; relative references are data until the host resolves them against an explicit base URL through resolveOpds2Href.
Opds2LinkProperties
Structured properties of a link: the OPDS 2.0 acquisition properties plus the Readium EPUB and encryption extension members.
Opds2LocalizedText
A value that may carry one unlocalized string or a language map ({"en": ..., "pt-BR": ...}).
Opds2Metadata
Metadata of a publication (the Readium Web Publication metadata subset).
Opds2Price
Price of an acquisition link.
Opds2Publication
One publication entry of a feed or a standalone publication document.
Opds2Subcollection
An unknown feed member, preserved as a named subcollection: either a full collection object or a compact array of links (nested objects in an array become children keyed by their index).
Opds2Subject
A subject of a publication.
OpdsAuthor
An author of a feed or entry.
OpdsEntry
One <entry> of an OPDS feed: either a catalog navigation point or an acquisition-ready publication.
OpdsFeed
A parsed OPDS feed: a catalog navigation page or an acquisition page of publications.
A link of a feed or entry.

Constants

opds2AcquisitionRels → const Set<String>
Link relations that mark an acquisition link under OPDS 2.0: the short relations of the specification and their OPDS 1.0 URI equivalents.
opds2AvailabilityStates → const Set<String>
The availability states of the OPDS 2.0 link properties.
opdsAcquisitionRel → const String
Acquisition (download) link relation of the OPDS 1.0 spec.
opdsCoverRel → const String
Cover image link relation of the OPDS 1.0 spec.
opdsThumbnailRel → const String
Thumbnail link relation of the OPDS 1.0 spec.

Functions

expandOpds2Template(String template, Map<String, Object?> values) → String
Expands the supported subset of RFC 6570 URI templates in template.
isOpds2AcquisitionRel(String rel) → bool
Whether rel marks an acquisition link under OPDS 2.0.
parseOpds2Feed(String source, {Opds2Limits limits = const Opds2Limits()}) → Opds2Feed
Parses OPDS 2.0 JSON catalogs into the public model.
parseOpds2FeedBytes(Uint8List bytes, {Opds2Limits limits = const Opds2Limits()}) → Opds2Feed
Parses an OPDS 2.0 feed from raw bytes.
parseOpds2Publication(String source, {Opds2Limits limits = const Opds2Limits()}) → Opds2Publication
Parses a standalone OPDS 2.0 publication document (media type application/opds-publication+json).
parseOpds2PublicationBytes(Uint8List bytes, {Opds2Limits limits = const Opds2Limits()}) → Opds2Publication
Parses a standalone OPDS 2.0 publication document from raw bytes.
resolveOpds2Href(String href, {Uri? baseUrl}) → Uri?
Resolves href as an OPDS 2.0 link target against baseUrl.

Exceptions / Errors

Opds2Exception
Base failure of the OPDS 2.0 JSON parser.
Opds2LimitExceededException
Input crossed a declared Opds2Limits bound. Limits are checked before the corresponding output is allocated; raising them is the caller's explicit decision.
Opds2MalformedException
The document is not a well-formed OPDS 2.0 JSON document: broken or truncated JSON, a required member missing, a value of the wrong type, or a normative requirement the official schema does not enforce.