Repository navigation
Expand file tree
/
Copy pathindex.mjs
More file actions
58 lines (50 loc) · 2.03 KB
/
Copy pathindex.mjs
File metadata and controls
58 lines (50 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// libby-archiver — public library API.
//
// Import the pieces you need to script your own flows, or use the `libby` CLI.
//
// import { authenticate, sync, audiobookLoans, archiveAudiobook } from 'libby-archiver';
//
// const cfg = { library: 'your-library', websiteId: '123', cardNumber: '...', pin: '' };
// const { client, identity } = await authenticate(cfg);
// const { loans } = await sync(client, identity);
// for (const loan of audiobookLoans(loans)) {
// await archiveAudiobook({ client, identity, cfg }, loan, './archive');
// }
// Auth + low-level client
export { authenticate } from './auth.mjs';
export {
SentryClient,
SentryError,
decodeJwt,
CLIENT_VERSION,
READ_HOST,
GATEWAY_HOST,
} from './sentry.mjs';
// Account / loans
export { sync, audiobookLoans, readableLoans } from './loans.mjs';
// Catalog search + discovery + checkout (borrow / return / hold)
export { searchCatalog } from './search.mjs';
export { getAvailability, getTitle, getCharacteristics } from './discover.mjs';
export { getLoanPeriods, borrowTitle, returnTitle, placeHold, cancelHold } from './checkout.mjs';
// Open + openbook decode + spine
export {
buildCodex,
openLoan,
openKindFor,
fetchOpenbook,
decodeOpenbook,
probeEData,
extractSpine,
} from './openbook.mjs';
// Read-host (ebook / magazine) content decode + EPUB packaging
export { cfc1, decodePage, probeCfc1, fetchPage, fetchReadResource, assetRefs } from './read.mjs';
export { buildEpub, zip, entriesFor, writeZip, writeEpub } from './epub.mjs';
// Download + supplementary metadata
export { downloadPart } from './download.mjs';
export { fetchThunderMedia, maxResCoverUrl, downloadCover } from './metadata.mjs';
// High-level orchestrators (one loan -> self-contained folder)
export { archiveAudiobook } from './archive.mjs';
export { archiveReadable } from './archive-read.mjs';
// Config + library discovery
export { loadConfig, saveConfig, configDir, configPath, sessionPath } from './config.mjs';
export { resolveLibrary, detectInsecureTLS } from './library.mjs';