Skip to content

Commit 09584d3

Browse files
test: Add unofficial OPDS library lending fields to Atom reference
1 parent be5049e commit 09584d3

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

src/feeds/atom/references/atom-ns.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,26 @@
834834
"facetGroup": "Sort By",
835835
"activeFacet": true
836836
}
837+
},
838+
{
839+
"href": "https://example.com/borrow/123",
840+
"rel": "http://opds-spec.org/acquisition/borrow",
841+
"type": "application/atom+xml;type=entry;profile=opds-catalog",
842+
"opds": {
843+
"availability": {
844+
"status": "available",
845+
"since": "2024-01-01T00:00:00Z",
846+
"until": "2024-12-31T23:59:59Z"
847+
},
848+
"holds": {
849+
"total": 5,
850+
"position": 2
851+
},
852+
"copies": {
853+
"total": 3,
854+
"available": 1
855+
}
856+
}
837857
}
838858
]
839859
}

src/feeds/atom/references/atom-ns.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,5 +591,10 @@
591591
</opds:indirectAcquisition>
592592
</link>
593593
<link href="https://example.com/catalog?sort=new" rel="http://opds-spec.org/facet" title="New Releases" opds:facetGroup="Sort By" opds:activeFacet="true"/>
594+
<link href="https://example.com/borrow/123" rel="http://opds-spec.org/acquisition/borrow" type="application/atom+xml;type=entry;profile=opds-catalog">
595+
<opds:availability status="available" since="2024-01-01T00:00:00Z" until="2024-12-31T23:59:59Z"/>
596+
<opds:holds total="5" position="2"/>
597+
<opds:copies total="3" available="1"/>
598+
</link>
594599
</entry>
595600
</feed>

0 commit comments

Comments
 (0)