the_lord_of_the_rings_sdk-test

1.0.0 • Public • Published

The Lord of the Rings SDK

Create instance

  const sdk = new LOTRSDK('your-api-key-123');

Only the /book endpoint is available without authentication.

You can obtain an access token by signing up for an account here.

Example

  sdk.getMovies({
    greaterThanOrEqualTo: {
      academyAwardWins: 17
    }
  };

  sdk.getBooks({
    negateMatch: {
      name: 'The Two Towers'
    }
  };

  sdk.getMovies({
    exclude: {
      academyAwardWins: [0, 1, 2, 4]
    }
  };

Description of the methods

Methods Args Description
getBooks params* returns an array of books
getBookById id, params* returns the specific book
getBooksChapter id, params* returns an array of chapters of the specific book
getMovies params* returns an array of movies
getMovieById id, params* returns the specific movie
getMoviesQuote id, params* returns an array of quotes of the specific movie
getCharacters params* returns an array of characters
getCharacterById id, params* returns the specific character
getCharactersQuote id, params* returns an array of quotes of the specific character
getQuotes params* returns an array of quotes
getQuoteById id, params* returns the specific quote
getChapters params* returns an array of chapters
getChapterById id, params* returns the specific chapter

Description of the params

Params is an abject

Methods value Description
limit number number of record
page number number of page
offset number number from which orders is starting
sortAsc array of strings array, where value is the key to sort by asc
sortDesc array of strings array, where value is the key to sort by asc
match object object, where the key is equal value
negateMatch object object, where the key is not equal value
include object object, where the key is equal array of values
exclude object object, where the key is not equal array of values
exists string the key that should be in the entry
notExists string the key that should not be in the entry
matchRegex object object, where the key is match regex
negateMatchRegex object object, where the key is not match regex
lessThan object object, where the key is less than value
greaterThan object object, where the key is greater than value
greaterThanOrEqualTo object object, where the key is reater than or equal to value

Readme

Keywords

none

Package Sidebar

Install

npm i the_lord_of_the_rings_sdk-test

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

14.1 kB

Total Files

10

Last publish

Collaborators

  • denis_tarasenko