Last active
July 5, 2023 19:59
-
-
Save malerba118/797baed6f0db4b233edfbe5e25150ded to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Book = { | |
id: string | |
image: string | |
title: string | |
description: string | |
duration: number // (milliseconds?) | |
audio: string | |
chapters: Chapter[] | |
} | |
type Chapter = { | |
id: string | |
title: string | |
start: number /* 0-1 */ | |
stop: number /* 0-1 */ | |
} | |
type Account = { | |
user_id: string | |
books: [{ | |
book_id: string | |
progress: number /* 0-1 */ | |
}] | |
} | |
api.books.list({ genre: 'Science Fiction' }) | |
api.books.search({ query: 'Harry Potter' }) | |
api.books.getById('123') | |
api.account.get() | |
api.account.updateBookProgress({ book_id, progress }) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment