2.6.0 • Published 1 year ago

anime-quotes-sdk v2.6.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Introduction

Animekun is a tiny sdk to get random anime quotes

Its absolutely free to use.

If you find this sdk helpful, please consider leaving a rating. 😎👍🏻

If you have any questions, suggestions, or anything else, don't hesitate to reach out to me! 🧑‍💻

Getting Started

Get a random quote.

 const animeQuotes = require('anime-quotes-sdk');
 const quotes = new animeQuotes();
 quotes
 .fetchQuotes()
 .then(() => {
   quotes
     .getRandomQuote()
     .then((quote) => {
       console.log("Random Quote:", quote);
     })
     .catch((err) => console.error("Failed to get random quote:", err));
 })
 .catch((err) => console.error("Failed to fetch quotes:", err));

Get a random quote by anime title.

   const animeQuotes = require('anime-quotes-sdk');
 const quotes = new animeQuotes();
 quotes
 .fetchQuotes()
 .then(() => {
   quotes
     .getRandomQuoteByAnime("naruto")
     .then((quote) => {
       console.log("Random Quote from Naruto:", quote);
     })
     .catch((err) =>
       console.error("Failed to get random quote from Naruto:", err)
     );
 })
 .catch((err) => console.error("Failed to fetch quotes:", err));

Get upto 10 random quotes.

  const animeQuotes = require('anime-quotes-sdk');
  const quotes = new animeQuotes();
  quotes
  .fetchQuotes()
  .then(() => {
    quotes
      .getRandomQuotes(10)
      .then((quotes) => {
        console.log("Random 10 Quotes:", quotes);
      })
      .catch((err) => console.error("Failed to get random 10 quotes:", err));
  })
  .catch((err) => console.error("Failed to fetch quotes:", err));

Get upto 10 random quotes by anime name

 const animeQuotes = require('anime-quotes-sdk');
const quotes = new animeQuotes();
quotes
.fetchQuotes()
.then(() => {
  quotes
    .getQuotesByAnime("naruto", 10)
    .then((quotes) => {
      console.log("10 Quotes from Naruto:", quotes);
    })
    .catch((err) =>
      console.error("Failed to get 10 quotes from Naruto:", err)
    );
})
.catch((err) => console.error("Failed to fetch quotes:", err));
2.6.0

1 year ago

2.5.0

1 year ago

2.4.2

1 year ago

2.4.1

1 year ago

2.4.0

1 year ago

2.3.0

1 year ago

2.2.0

1 year ago

2.1.0

1 year ago

2.0.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago