Socket
Book a DemoInstallSign in
Socket

tcatic-sdk

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

tcatic-sdk

SDK for an existing LOTR API

unpublished
latest
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Lord of The Rings SDK

This module implements the Lord of The Rings API that can be found under https://the-one-api.dev/v2. The module can be imported and used in your code as:

import { LotrSdk } from 'tcatic-sdk';
// Create a LotrSdk instance with your bearer token from `the-one-api`
const lotrSdk = new LotrSdk('your-api-key');

// Get all books
const books = await lotrSdk.books.get();

// Get one specific book
const book = await lotrSdk.books.get({
    id: '5cf5805fb53e011a64671582'
});

/* All options that can be set are
{
    id?: string;
    action?: 'quote' | 'chapter';
    limit?: number;
    page?: number;
    offset?: number;
    filter?: FilterOptions;
    sort?: SortOptions;
}
*/

The module supports five different endpoints: /book, /character, /chapter, /movie, /quote. All modules can be accessed in the same way:

lotrSdk.{books | characters | chapters | movies | quotes }.get();

Test the application

To test the application, just run npm run test from the root. For now, tests have only been added for the /book endpoint and should be expanded.

FAQs

Package last updated on 17 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.