1.0.7 • Published 1 year ago

mine123123 v1.0.7

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

@joshuajc/ringapi SDK

About

The @joshuajc/ringapi Node SDK allows you to quickly and easily integrate Lord of Ring Api effortlessly.

Rest API Documentation can be found on this url.

You have to signup on this platform to get accesskey.

Note

This Readme provide basic installation and usage information.

Installation

npm install @joshuajc/ringapi

Usage

You can use this library based on JS/TS method chaining.

// get book list
import RingAPI from '@joshuajc/ringapi';

const books = RingAPI.getBooks();

//output will be json array containing books data

You can insert filtering, sorting, pagination before getting specific data.

import RingAPI from '@joshuajc/ringapi';

const books = RingAPI.setSorting('asc').getBooks() // set ascending order

const books = RingAPI.setPaginationPage(2).getBooks() // set 2nd page and get result

// You can combine multile function calls by chaining

const books = RingAPI.setPaginationOffset(12).setSorting('desc').getBooks() // set both of page offset and sorting

// You should set auth token before calling sensitve datas

const acccessTokenString = "abcdddssdf1s"; // you should replace this with real token

const movieId = 'a34d43"

const movie = RingAPI.setAccessToken(tokenString).setPaginationPage(1).setSorting('asc').getMovie(movieId);