https://github.com/hamirmahal/lotr-sdk
https://github.com/hamirmahal/lotr-sdk
ci eslint git github-actions javascript jest jest-tests js json json-api npm ts typescript
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hamirmahal/lotr-sdk
- Owner: hamirmahal
- Created: 2023-05-17T23:42:34.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-08T23:46:17.000Z (over 1 year ago)
- Last Synced: 2025-02-05T11:45:13.158Z (5 months ago)
- Topics: ci, eslint, git, github-actions, javascript, jest, jest-tests, js, json, json-api, npm, ts, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@hamirmahal/lotr-sdk
- Size: 181 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# Installation
You can run `npm install @hamirmahal/lotr-sdk` in your terminal to install this SDK for use in TypeScript and JavaScript projects.
# Usage
## TypeScript
```typescript
import { LordOfTheRingsSDK } from '@hamirmahal/lotr-sdk';const lotrSDK = new LordOfTheRingsSDK();
const runDemo = async () => {
const result = await lotrSDK.authenticate('YOUR_API_KEY_HERE');
console.log('Authentication result: ', result);const movies = await lotrSDK.getMovies();
console.log('Movies: ', movies);
};runDemo();
```## JavaScript
```javascript
const { LordOfTheRingsSDK } = require('@hamirmahal/lotr-sdk');const lotrSDK = new LordOfTheRingsSDK();
const runDemo = async () => {
const result = await lotrSDK.authenticate('YOUR_API_KEY_HERE');
console.log('Authentication result: ', result);const movies = await lotrSDK.getMovies();
console.log('Movies: ', movies);
};runDemo();
```# Testing
1. Create a `.env` file at the root of this repository if it does not exist already, and update the contents of the file with your API key.
```
API_KEY=replace_everything_after_the_equals_sign_with_your_api_key
```2. You should now be able to run `npm test` to verify this SDK works as intended.