The API v2 is simply a collection of books:
GET
on/books
– retrieve all the known books- returns an object with
books
– an array of books –bin
– an array of books that have been deleted and can be restored
- returns an object with
POST
on/books
– add a new bookPUT
on/books/:id
– edit a bookDELETE
on/books/:id
– move the book to the bin, returns bin
Version v2 differs from v1 only in that it switched authentication from Google to Auth0.
A book is structured like this:
interface Author {
fname: string,
lname: string,
}
interface Book {
id: unknown,
title: string,
author?: Author,
series?: string,
owned: boolean,
notes?: string,
mtime: number,
}