1.2.0 β’ Published 4 years ago
benedu-nodejs v1.2.0
benedu-nodejs
Do Something Funπ€£, Based on Benedu2020
Example
import getUserToken from './auth/getUserToken'
import getTaskExamList from './exam/getTaskExamList'
(async () => {
await getUserToken({
username: 'username',
password: 'password'
})
console.log(await getTaskExamList()) // Print κ³Όμ
})()
import getTaskExamList from './exam/getTaskExamList'
getTaskExamList({
providedToken: "ASPAUTHTOKEN"
}).then(console.log)
Functions
login
λ² λ€λ κ³μ μΌλ‘ λ‘κ·ΈμΈνκ³ ν ν°μ λ°νν©λλ€. ν ν°μ λͺ¨λ λ΄λΆμ μμμ μΌλ‘ μ μ₯λ©λλ€.
Parameters
key | description | type | optional | |
---|---|---|---|---|
username | μ΄λ©μΌ | string | ||
password | λΉλ°λ²νΈ | string |
Return Type
Promise<string>
getTaskExamList
κ³Όμ λͺ©λ‘μ λ°νν©λλ€
Parameters
key | description | type | optional |
---|---|---|---|
providedToken | μ¬μ©μ μ§μ ν ν° | string | Y |
Return Type
Promise<BriefExam[]>
getCreatedExam
μμ±λ λ¬Έμ μν μνμ§λ₯Ό λ°νν©λλ€
Parameters
key | description | type | optional |
---|---|---|---|
providedToken | μ¬μ©μ μ§μ ν ν° | string | Y |
Return Type
Promise<BriefExam[]>
getBeforeRegularExam
μ΄μ μ§νκ³ μ¬ μ 보λ₯Ό λ°νν©λλ€
Parameters
key | description | type | optional |
---|---|---|---|
subject | κ³Όλͺ©μ½λ | Subject | N |
grade | νλ μ½λ | Grade | N |
year | μ°λμ½λ | Year | N |
providedToken | μ¬μ©μ μ§μ ν ν° | string | Y |
Return Type
Promise<RegularExamSource[]>
Classes
CreationSource
λ¬Έμ μνμ μλ³Έμ΄ λλ μνμ§μ μ 보λ₯Ό λ΄μ΅λλ€
Fields
key | description | type | optional |
---|---|---|---|
title | μμ€ μ΄λ¦ | string | N |
subject | κ³Όλͺ©μ½λ | Subject | N |
grade | μ°λμ½λ | Grade | N |
sourceId | μ¬μ©μ μ§μ ν ν° | string | Y |
Methods
register
Parameters
key | description | type | optional |
---|---|---|---|
title | λ±λ‘ν μ΄λ¦ | string | Y |
providedToken | μ¬μ©μ μ§μ ν ν° | string | Y |
Return Type
Promise<BriefExam[]>
Subclasses
RegularExamSource
μ΄μ μ§νκ³ μ¬ μ 보λ₯Ό λ΄λ ν΄λμ€μ λλ€
Additional
key | description | type | optional |
---|---|---|---|
year | μ°λμ½λ | Year | N |
Contributor
To-Do
- Create new exam
- Benedu2020 Coverage 100%
- Deno Port