@helderjbe/lotr-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Lord of the Rings SDK

Installation

Use npm to install the SDK:

npm install --save @helderjbe/lotr-sdk

Or if you prefer yarn:

yarn add @helderjbe/lotr-sdk

Quick 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 object

Testing

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 b69b28ddbed643f88b72f173a88d19ab

Install dependencies:

npm install

Now, run the test script:

npm test

Troubleshooting

If an error pops up when installing deps with npm i, try installing with npm i -f

Readme

Keywords

none

Package Sidebar

Install

npm i @helderjbe/lotr-sdk

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

26.6 kB

Total Files

43

Last publish

Collaborators

  • helderjbe