npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tin-chi-kma

v1.1.3

Published

Library to connect with CMCSoft System

Downloads

5

Readme

TIN-CHI-KMA

Module tích hợp để tương tác với hệ thống đăng ký tín chỉ của CMCSoft . Ví dụ:

ĐẠI HỌC HÀNG HẢI

ĐẠI HỌC VINH

...

CÀI ĐẶT

Cài từ npmjs:


npm install --save tin-chi-kma

Cài từ github:


npm install --save Notekunn/tin-chi-kma

KHỞI TẠO

HOST_API chính là phần url trước CMCSoft.IU.Web.info không bao gồm dấu /.

Khởi tạo api như sau:

    const login = require("tin-chi-kma")({ HOST_API: 'HOST_API CUA BAN' });
    login({ user: '', pass: '' }, function(error, api) {

    })

LOGIN

Đăng nhập vào trang đăng ký tín chỉ.

   login({user:'MA SINH VIEN', pass: 'Mat khau'}, function(error,api){
      /*
        Biến error chứa lỗi, mang giá trị undefined nếu không có lỗi
        Biến api là 1 object chứa các api hoặc undefined nếu bị lỗi
      */
   })
   // Hoặc
   login({user:'MA SINH VIEN', pass: 'Mat khau'})
    .then(api => {})
    .catch(error => {})

CÁC API

api.studyRegister

Các api để đăng ký tín chỉ

api.studyRegister.showAcademicYears

api lấy các năm học(khóa học)

   api.studyRegister.showAcademicYears(function(error, years){
       /*
       years là 1 mảng chứa các object { name: 'Tên Khóa', value: drpAcademicYear }
       */
   })
   //Hoặc
   api.studyRegister.showAcademicYears()
       .then()
       .catch();

api.studyRegister.showCourses

api lấy thông tin về các môn học

   api.studyRegister.showCourses(drpAcademicYear, function(error, courses){
       /*
       courses là 1 mảng chứa các object { name: 'Tên Môn HỌC', value: drpCourse }
       */
   })
   //Hoặc
   api.studyRegister.showCourses(drpAcademicYear)
       .then()
       .catch();

api.studyRegister.showClasses

api lấy các lớp học của môn học đó

    api.studyRegister.showClasses(drpAcademicYear, drpCourse, function(error, classes) {
        /*
        classes là mảng chứa các object về thông tin các lớp học
        */
    })
    //Hoặc
    api.studyRegister.showClasses(drpAcademicYear, drpCourse)
       .then()
       .catch();

api.studentTimeTable

các api liên quan đến thời khóa biểu

api.studyRegister.showSemesters

api lấy các học kỳ

    api.studyRegister.showSemesters(function(error, semesters) {
        /*
        semesters là mảng chứa các object về thông tin các học kỳ
           name: tên học kỳ
           value: chuỗi hash
        */
    })
    //Hoặc
    api.studyRegister.showSemesters()
        .then()
        .catch();

api.studentTimeTable.showTimeTable

api lấy thời khóa biểu

    api.studentTimeTable.showTimeTable(semester /* giá trị value ở trên hoặc để undefined nếu lấy thời khóa biểu khóa mới nhât */ , function(scheduleData) {
        /*
           Trả về mảng thời khóa biểu
        */
    })
    //Hoặc
    api.studyRegister.showTimeTable(semester)
        .then()
        .catch();

api.studentProfile

các api liên quan đến thông tin sinh viên

api.studentProfile.show

api show thông tin

    api.studentProfile.show(function(error, information) {
        /*
        information object chứa thông tin về thông tin các học kỳ
            displayName
            studentCode
            gender
            birthday
        */
    })
    //Hoặc
    api.studyRegister.show()
        .then()
        .catch();