New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

gotquestions

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

gotquestions

gotquestions is a package designed to scrape the gotquestions.org api

unpublished
latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

gotquestions


gotquestions is a package designed to scrape the gotquestions.org api
const gq = require("gotquestions");
(async () => {
  await gq.fetchDataByQuery("Jesus");
  /*
  {
    error: false,
    articleTitle: "How many prophecies did Jesus fulfill? | GotQuestions.org",
    articleBody: "...",
    url: "..."
  }
  */
})();

Installation

npm install gotquestions

Documentation

Error Handling

All errors return the following object

{
  error: true,
  errorStack: "..."
}

gq.fetchDataByUrl(url)

await gq.fetchDataByUrl("https://www.gotquestions.org/prophecies-of-Jesus.html");
/*
{
  error: false,
  articleTitle: "How many prophecies did Jesus fulfill? | GotQuestions.org",
  articleBody: "...",
  url: "..."
}
*/

gq.fetchDataByQuery(query, index)

await gq.fetchDataByQuery("Jesus", 0);
/*
{
  error: false,
  articleTitle: "How many prophecies did Jesus fulfill? | GotQuestions.org",
  articleBody: "..."
}
*/

gq.search(query)

await gq.search("Jesus")
/* 
{ 
  error: false,
  queryResults: [
    {
      articleTitle: "How many prophecies did Jesus fulfill? | GotQuestions.org",
      url: "https://www.gotquestions.org/prophecies-of-Jesus.html"
    },
    ...
  ]
}
*/

License

gotquestions is licensed under the MIT License.

Keywords

gotquestions

FAQs

Package last updated on 10 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts