CL-feeds.ts, CL-feeds.js
TypeScript
import { CLFeeds } from "https://caltechlibrary.github.io/CL-feeds.ts";
JavaScript
import { CLFeeds } from "https://feeds.library.caltech.edu/models/CL-feeds.js";
This is a module written in TypeScript and also transpiled to
JavaScript. It is targeting both evergreen web browsers that support ES6
or better JavaScript run times as well as TypeScript runtime like Deno
2.2. It provides a simple wrapper various feeds.library.caltech.edu end
points that are useful for working with Bibliographic data from various
Caltech Library repositories. It relies on CL-core.js
library.
From JavaScript CL-core.js
and CL-feeds.js
are not usually used directly. Instead you would usually use the bundled
form, CL-v1.js. From TypeScript you can
import the CL.ts
module that exports both
CL-core.ts
and CL-feeds.ts
.
This a JavaScript example shows how to use
CLFeeds.getPeopleList
to retrieve a list of CaltechPEOPLE
that have bibliographic data available from CaltechAUTHORS, CaltechTHESIS and CaltechDATA.
import { CLFeeds } from "https://feeds.library.caltech.edu/models/CL-feeds.js";
let payload = await CLFeeds.getPeopleList();
if (payload.ok) {
// Display the object listing CaltechPEOPLE
console.log(JSON.stringify(payload.data, null, 2));
else {
} // something when wrong
console.error(payload.error);
}