1.3.0 • Published 2 years ago

kuwrapper v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

kuwrapper.js

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

Install

npm i kuwrapper

Example ES6

Create client by KU username and password

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

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
}
1.3.0

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago