# kuwrapper

> kuwrapper.js is a client instance for fetching data in my.ku.th like class schedule , grade history , gpax and other.

Latest version **1.3.0** (published 2022-05-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install kuwrapper
pnpm add kuwrapper
yarn add kuwrapper
bun add kuwrapper
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2022-05-20 |
| First published | 2022-05-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 74.3 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Hirasawa Ishigawa |
| Maintainers | hirasawa_au |

## Links

- npm: https://www.npmjs.com/package/kuwrapper
- Repository: https://github.com/hirasawaau/kuwrapper.js
- Homepage: https://github.com/hirasawaau/kuwrapper.js#readme
- Issues: https://github.com/hirasawaau/kuwrapper.js/issues
- npm.io page: https://npm.io/package/kuwrapper

## Dependencies (1)

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

## Recent versions

- 1.3.0 (latest) — 2022-05-20
- 1.2.0 — 2022-05-18
- 1.1.1 — 2022-05-17
- 1.1.0 — 2022-05-17
- 1.0.3 — 2022-05-17
- 1.0.2 — 2022-05-15
- 1.0.1 — 2022-05-15

## README

# kuwrapper.js

kuwrapper.js is a client instance for fetching data in my.ku.th like class schedule , grade history , gpax and other.

## Install

```bash
npm i kuwrapper
```

## Example [ES6]

### Create client by KU username and password

```ts
import { createClientInstance } from 'kuwrapper'
async function main() {
  const client = await createClientInstance('username', 'password')

  // Fetch Class Schedule
  const schedule = await client.getClassSchedule()
  return schedule
}

// Call function then console.log
main().then(console.log)
```

### Create client by custom payload

```ts
import { createClientInstance, PersonalPayload } from 'kuwrapper'
async function main() {
  const payload = new PersonalPayload(accessToken)
    .setUserType('user_type')
    .setStudentStatusCode('student_status_code')
    .export()
  const client = await createClientInstance(payload)

  // Fetch Class Schedule
  const schedule = await client.getClassSchedule()
  return schedule
}
```

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