# tsinghua-course-core

> An utility for courses electing in the Tsinghua University.

Latest version **0.0.2** (published 2019-05-31) · ISC license · 0 weekly downloads

## Install

```sh
npm install tsinghua-course-core
pnpm add tsinghua-course-core
yarn add tsinghua-course-core
bun add tsinghua-course-core
```

## 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.0.2 |
| Published | 2019-05-31 |
| First published | 2019-05-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 13.2 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| Author | Rika |
| Maintainers | rika__ |

## Links

- npm: https://www.npmjs.com/package/tsinghua-course-core
- Repository: https://github.com/RikaSugisawa/tsinghua-course-core
- Homepage: https://github.com/RikaSugisawa/tsinghua-course-core#readme
- Issues: https://github.com/RikaSugisawa/tsinghua-course-core/issues
- npm.io page: https://npm.io/package/tsinghua-course-core

## Dependencies (8)

- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [cheerio](https://npm.io/package/cheerio.md) ^1.0.0-rc.3
- [request](https://npm.io/package/request.md) ^2.88.0
- [iconv-lite](https://npm.io/package/iconv-lite.md) latest
- [tough-cookie](https://npm.io/package/tough-cookie.md) ~2.4.3
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.4.5
- [es6-promise-pool](https://npm.io/package/es6-promise-pool.md) ^2.5.0
- [request-promise-native](https://npm.io/package/request-promise-native.md) ^1.0.7

## Recent versions

- 0.0.2 (latest) — 2019-05-31
- 0.0.1 — 2019-05-31

## README

# tsinghua-course-core
该项目希望实现对于清华大学教务选课系统的部分功能的API

### Example
登录并获取当前开课信息
```javascript
import CourseManager from './src/CourseManager'

const mgr = new CourseManager();
(async function () {
  const img=await mgr.loginMgr.getCaptcha()
  // Pass the captcha to user to get reply
  // Also you can get the cookie JSESSIONID from a web page and pass it to 
  // - mgr.loginMgr._login()
  await mgr.loginMgr.login(username, password, captcha)
  return await mgr.crsMgr.getOpeningInfo()
})().then((e)=>console.log(e))
```

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