anton-fedosieiev-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Simple LOTR SDK

SDK for LOTR API

Install

You can install package using npm

npm i --save simple-lotr-sdk

const lotr = new LotrSdk({ apiKey: '<YOUR_API_KEY>' });

lotr.getMovies().then(res => console.log(res));

Interface

Public methods

This methods do not require API key

  • getBookList(params)
  • getBook(id)
  • getBookChapters(id, params)

Private methods

This methods require API key

  • getMoviesList(params)
  • getMovie(id)
  • getMovieQuotes(id, params)
  • getCharactersList(params)
  • getCharacter(id)
  • getCharacterQuotes(id, params)
  • getQuotesList(params)
  • getQuote(id)
  • getChaptersList(params)
  • getChapter(id)

Params

type params = {
  pagination?: {
    limit: number;
    page?: number;
    offset?: number;
  };
  sort?: {
    property: string;
    direction: 'asc' | 'desc';
  };
  filter?: {
    property: string;
    value?: string | string[] | RegExp;
    exclude?: boolean;
    exists?: boolean;
    comparisonRule?: 'less than' | 'less than equal' | 'greater than' | 'greater than equal';
  };
};

Readme

Keywords

Package Sidebar

Install

npm i anton-fedosieiev-sdk

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

58.8 kB

Total Files

38

Last publish

Collaborators

  • anton.fedosieiev