brainly-wrapper

1.0.59 • Public • Published

Unoffical Brainly-wrapper

written in nodejs, do your homework now!

Fix version from 1.0.55

const brainly = require("brainly-wrapper")

brainly.getQuestion("kepanjangan NKRI").then(console.log).catch(console.error)

brainly.setServer("US")

brainly.getQuestion("what is 1 + 1").then(console.log).catch(console.error)

function getQuestion() will return Array as structure:

[{
  "node": {
    "id": "xxx=",
    "databaseId": "Number",
    "author": {
      "id": "xxx",
      "databaseId": "Number",
      "isDeleted": "boolean",
      "nick": "String (Username)",
      "avatar": {
        "thumbnailUrl": "String (URL)",
        "__typename": "Attachment"
      },
      "rank": {
        "name": "String (Rank)",
        "__typename": "Rank"
      },
    "__typename": "User"
    },
    "content": "String (Question)",
    "answers": {
      "nodes": [
        {
          "thanksCount": 1,
          "ratesCount": 1,
          "rating": 5,
          "content": "String (Answer)",
          "__typename": "Answer"
        }
      ],
      "hasVerified": "boolean",
      "__typename": "AnswerConnection"
    },
    "__typename": "Question"
  }
}]

Test the package with npm test

Contributions, Issues, visit Github

Readme

Keywords

Package Sidebar

Install

npm i brainly-wrapper

Weekly Downloads

0

Version

1.0.59

License

MIT

Unpacked Size

9.12 kB

Total Files

14

Last publish

Collaborators

  • fastering18