node-brainly
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Brainly Api for NodeJs 💚

An api that obtains data from Brainly directly through the API, using NodeJs

Installation

npm i brainly-api

or

npm i https://github.com/LearXD/brainly-api

Usage

const brainly = require("node-brainly");

const brainly = new Brainly({ language: 'pt' })

const search = await brainly.search('Who discovered Brazil?')
const answers = await brainly.getQuestionById(search.results[0].question.id)

console.log(`Answer 1: ${answers.data.questionById.answers.nodes[0]?.content}`)
console.log(`Answer 2: ${answers.data.questionById.answers.nodes[1]?.content}`)

Support

Be free to submit PRs and Issues if necessary

Author

/node-brainly/

    Package Sidebar

    Install

    npm i node-brainly

    Weekly Downloads

    3

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    20.6 kB

    Total Files

    21

    Last publish

    Collaborators

    • learxd