Coder Social home page Coder Social logo

lord-of-the-rings-sdk's Introduction

Ayoub Boulbaz's Lord of the Rings SDK!

This Lord of the Rings SDK is a software development kit that allows developers to easily fetch data about the Lord of the Rings movies and quotes. You can check the latest stats related to the npm package: https://socket.dev/npm/package/ayoub_boulbaz-sdk

Installation

To install the SDK, simply run:

npm install lord-of-the-rings-sdk

or:

  1. Clone the SDK repository to your local machine using git clone https://github.com/AyoubHolmes/Lord-of-the-Rings-SDK.git.
  2. Add your own API Key in the src/constants.ts file.
  3. Install the required dependencies by running npm install.
  4. Once the dependencies are installed, you can start using the SDK in your own project

Usage

The SDK provides five main functionalities:

  1. Fetching all the movies.
  2. Fetching a single movie's information.
  3. Fetching a single movie's famous quotes.
  4. Fetching all the quotes in all the movies.
  5. Fetching a single quote's information.

1- Fetching all the movies.

To fetch all the Lord of the Rings movies, you can use the getMovies method. This method takes no parameter.

Here's an example of how to use the getMovies method:

import { LordOfTheRingSDK } from 'ayoub_boulbaz-sdk';

const  lordOfTheRingSDK = new  LordOfTheRingSDK();

lordOfTheRingSDK.movies.getMovies()
.then(movies => console.log(movies));

2- Fetching a single movie's information.

To fetch information about a single Lord of the Rings movie, you can use the getMovieById method. This method takes an parameter that specifies the movie's id in the database you want to retrieve information for.

Here's an example of how to use the getMovieById method:

import { LordOfTheRingSDK } from 'ayoub_boulbaz-sdk';

const  lordOfTheRingSDK = new  LordOfTheRingSDK();

lordOfTheRingSDK.movies.getMovieById()
.then(movie => console.log(movie));

3- Fetching a single movie's famous quotes.

To fetch all the famous quotes of a Lord of the Rings movie, you can use the getMovieQuotesById method. This method takes an parameter that specifies the movie's id in the database you want to retrieve its quotes.

Here's an example of how to use the getMovieQuotesById method:

import { LordOfTheRingSDK } from 'ayoub_boulbaz-sdk';

const  lordOfTheRingSDK = new  LordOfTheRingSDK();

lordOfTheRingSDK.movies.getMovieQuotesById()
.then(movies => console.log(movies));

4- Fetching all the quotes in all the movies.

To fetch all the famous quotes of the Lord of the Rings movies, you can use the getQuotes method. This method takes no paramters.

Here's an example of how to use the getQuotes method:

import { LordOfTheRingSDK } from 'ayoub_boulbaz-sdk';

const  lordOfTheRingSDK = new  LordOfTheRingSDK();

lordOfTheRingSDK.quotes.getQuotes()
.then(movies => console.log(movies));

5- Fetching a single quote's information.

To fetch information about a single Lord of the Rings quote, you can use the getQuoteById method. This method takes a parameter that specifies the quote id in the database you want to retrieve information for.

Here's an example of how to use the getQuoteById method:

import { LordOfTheRingSDK } from 'ayoub_boulbaz-sdk';

const  lordOfTheRingSDK = new  LordOfTheRingSDK();

lordOfTheRingSDK.quotes.getQuoteById()
.then(movies => console.log(movies));

lord-of-the-rings-sdk's People

Contributors

ayoubholmes avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.