@book-effect/google-books
v0.2.3
Published
[Effect][effect]-based client for the [Google Books API][google-books-api].
Downloads
6
Readme
@book-effect/google-books
Effect-based client for the Google Books API.
Google Books provides a stable REST API for searching books and retrieving metadata including title, authors, publisher, publishedDate, identifiers, and cover links.
Installation
pnpm add @book-effect/google-booksUsage
import { GoogleBooksClient } from "@book-effect/google-books";
import { FetchHttpClient } from "@effect/platform";
import { Effect } from "effect";
const program = Effect.gen(function* () {
const client = yield* GoogleBooksClient;
const book = yield* client.getByIsbn("9780134757599");
const results = yield* client.search("Domain Driven Design");
return { book, results };
});
Effect.runPromise(
program.pipe(
Effect.provide(GoogleBooksClient.Live),
Effect.provide(FetchHttpClient.layer),
),
);Building
nx build google-books