1.1.1 • Published 1 year ago
lor-sdk v1.1.1
LOR - SDK
Lor SDK is a node.js pacage and its serves your needs regarding data about The Lord of the Rings
Get started
This is a Node.js module available through the npm registry. Installation is done using the npm install command:
npm install lor-sdk --save
Usage
Sample usage
import { LorLib, AuthConfig } from "lor-sdk";
const authOptions: AuthConfig = {
accessKey: "" // optional parameter
baseUrl: "" // optional parameter
}
const lorService = new LorLib(authOptions);
if accessKey Or baseUrl is not passed while creating the instance, add those variables in env file.
generate the accesstoken from here
LOR_LIB_BASE_URL=https://the-one-api.dev/v2
LOR_LIB_ACCESS_KEY="acceessToken"
All available services
interface QueryParams {
page?: number;
limit?: number;
offset?: number;
}
getMovies: (queryParms?: QueryParams) =>
Promise<import("axios").AxiosResponse<any, any>>;
getMovieById: (movieId: string) => Promise<any>;
getOneMovieAndQuotes: (movieId: string, queryParms?: QueryParams) =>
Promise<any>;
getOneMovieQuotes: (movieId: string, queryParms?: QueryParams) => Promise<any>;
getQuotes: (queryParms?: QueryParams) => Promise<any>;
getQuoteById: (quoteId: string) => Promise<any>;