goodreads-bookshelf-api
Version:
Unofficial Goodreads API for getting any user's bookshelf details
39 lines (36 loc) • 845 B
TypeScript
type GoodreadOptions = {
username: string;
shelf: string;
};
interface BaseItem {
title: string;
link: string;
pubDate: string;
content: string;
contentSnippet: string | null;
guid: string;
isoDate: string;
}
interface ContentData {
bookLink: string;
imageLink: string;
author: string;
name: string;
averageRating: number;
bookPublished: string;
rating: number | null;
readAt: string | null;
dateAdded: string;
shelves: string[];
review: string;
[key: string]: any;
}
interface ResponseItem extends ContentData, BaseItem {
}
declare class GoodreadsShelf {
private options;
constructor(options: GoodreadOptions);
fetch: () => Promise<ResponseItem[]>;
private booksParse;
}
export { GoodreadsShelf as default };