# brainly-client

> 🧠✨ brainly-client ✨

Latest version **0.1.4** (published 2021-07-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install brainly-client
pnpm add brainly-client
yarn add brainly-client
bun add brainly-client
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2021-07-28 |
| First published | 2021-07-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=14 |
| Dependencies | 1 |
| Unpacked size | 14.6 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 7 |
| Author | luisbrandino |
| Maintainers | luisbrandino |
| Keywords | brainly, api, client, brainlyapi, brainly-api, brainly-client |

## Links

- npm: https://www.npmjs.com/package/brainly-client
- Repository: https://github.com/luisbrandino/brainly-client
- Homepage: https://github.com/luisbrandino/brainly-client#readme
- Issues: https://github.com/luisbrandino/brainly-client/issues
- npm.io page: https://npm.io/package/brainly-client

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.21.1

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 0.1.4 (latest) — 2021-07-28
- 0.1.3 — 2021-07-12
- 0.0.3 — 2021-07-07
- 0.0.2 — 2021-07-07
- 0.0.1 — 2021-07-06

## README

<h1 align="center"><span style="font-size:75px;">🧠</span><br>✨ brainly-client ✨</h1> 
<p align="center">
<img alt="Package Version" src="https://img.shields.io/github/package-json/v/luisbrandino/brainly-client?style=flat-square">
<img alt="Top language" src="https://img.shields.io/github/languages/top/luisbrandino/brainly-client?style=flat-square">
<img alt="License" src="https://img.shields.io/github/license/luisbrandino/brainly-client?style=flat-square">
</p>

<p align="center">An unofficial API for Brainly.</p>

<hr>

## 🚀 Installation

Use the package manager [npm](https://nodejs.org/en/download/) to install brainly-client.

Simply run:

```bash
npm install brainly-client
```

<hr>

## 💻 Quickstart

A simple example of usage:

```js
const Client = require('brainly-client')
const brainly = new Client()

brainly.search('Test')
  .then(questions => {
    const question = questions[0]
    const answer = question.answers[0]

    console.log(question)
    console.log(answer)
  })
```

You can specify the number of questions you want to receive:

```js
const Client = require('brainly-client')
const brainly = new Client()

brainly.search({ query: 'Test', first: 10 })
  .then(questions => {
    console.assert(questions.length <= 10)
  })
```

You can also define a different server (BR is default):

```js
const Client = require('brainly-client')
const brainly = new Client({ server: 'ES' }) // Spain server
```

There are currently 9 servers you can use:

| Country     | Code | URL                    |
|-------------|------|------------------------|
| Spain       | ES   | https://brainly.lat    |
| Romania     | RO   | https://brainly.ro     |
| India       | HI   | https://brainly.in     |
| Poland      | PL   | https://brainly.pl     |
| Philippines | PH   | https://brainly.ph     |
| Indonesia   | ID   | https://brainly.co.id  |
| Turkey      | TR   | https://eodev.com      |
| Russia      | RU   | https://znanija.com    |
| Brazil      | BR   | https://brainly.com.br |

⚠️ Be aware that some of them may be deprecated 

<hr>

## 📜 License

[MIT](https://choosealicense.com/licenses/mit/)

---
_Source: https://npm.io/package/brainly-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
