1.0.1 • Published 2 years ago
@helderjbe/lotr-sdk v1.0.1
Lord of the Rings SDK
Installation
Use npm to install the SDK:
npm install --save @helderjbe/lotr-sdkOr if you prefer yarn:
yarn add @helderjbe/lotr-sdkQuick start
import { getAllMovies, getQuoteById } from '@helderjbe/lotr-sdk';
// Set the access token for authentication
const ACCESS_TOKEN = 'your_access_token_here';
// Fetch all movies
const movies = await getAllMovies(ACCESS_TOKEN);
console.log(movies); // array of movies
// Fetch a specific quote
const quote = await getQuoteById(ACCESS_TOKEN, 'quote_id');
console.log(quote); // quote objectTesting
To run tests, you will need to clone the repository and install the dependencies.
Clone the repository:
git clone https://github.com/hatchways-community/b69b28ddbed643f88b72f173a88d19ab.git
cd b69b28ddbed643f88b72f173a88d19abInstall dependencies:
npm installNow, run the test script:
npm testTroubleshooting
If an error pops up when installing deps with npm i, try installing with npm i -f