1.0.1 • Published 12 months ago
@jasonlantz/lotr-sdk v1.0.1
Lord of the Rings SDK
- A Lord of the Rings SDK
Getting Started
- Node js v19.7.0
- to install the sdk as an npm commponent:
npm i --save @jasonlantz/lotr-sdk
Since npm is replicated to unpkg.com you can also install the SDK from a script tag:
<script type="text/javascript" src="https://https://unpkg.com/@jasonlantz/lotr-sdk@1.0.1/index.js">
to use (in an ESNext environment with ES modules):
import {movies, movieById } from "@jasonlantz/lotr-sdk"
Testing
- after cloning the repo, install dependencies by running:
npm i
next Sign up for API access to get a bearer token to use as the api key.
after that, put a .env file at the project root with the api url and api key in the format:
API_KEY="Bearer xxxxxxxxxxxxxxx18KZi"
API_URL=https://the-one-api.dev/v2
after dependencies are installed and .env file is placed at the project root, you may run tests:
npm test