Getting Started
Installation
npm i @treyhoover/lotr-sdk
Generate Your Api Key
Click here to sign up and generate an Api key to use in your project.
Query Examples
import { Sdk } from "@treyhoover/lotr-sdk";
const sdk = new Sdk("YOUR_API_KEY");
const movies = await sdk.movies().fetch();
const hobbitMovie = await sdk
.movie({ id: "5cd95395de30eff6ebccde57" })
.fetch();
const fellowshipQuotes = await sdk
.movie({ id: "5cd95395de30eff6ebccde5c" })
.quotes()
.limit(5)
.fetch();
TODO:
- Use Zod for api response types
- Narrow sort/filter typing
- Add support for remaining routes
- Add tests
- Add JSDoc comments for better IntelliSense support