mystat-api
v4.1.9
Published
Library for mystat.itstep.org API for both node and browser
Downloads
6
Readme
Mystat API
Library for mystat API for both Node.js and browser
Requires minimum Node.js 18.x (for Node.js)
Installation
npm i mystat-api
yarn add mystat-api
pnpm add mystat-api
Usage/Examples
import { createClient } from "mystat-api";
const api = await createClient({
loginData: {
username: "MY_USERNAME",
password: "MY_PASSWORD",
},
language: "en",
});
const userInfo = await api.getUserInfo();
console.log(userInfo);
API Reference
authUser(userData);
- login to accountgetMonthSchedule(date)
- get schedule for current (or specific) monthdate
- specific date (Date
object)
getScheduleByDate(date)
- get schedule for current (or specific) daydate
- specific date (Date
object)
getReviews()
- get user reviewsgetVisits()
- get user visitsgetAttendance()
- get user attendancegetHomeworkList(homeworkStatus, page, type)
- get user homework or labhomeworkStatus
0
- overdue homeworks1
- checked homeworks2
- uploaded homeworks3
- active homeworks5
- deleted by teacher homeworks
page
- page numbertype
0
- homework1
- lab
getLatestNews()
- get newsgetNewsDetails(, newsId)
- get specific news infonewsId
- news id
getAllExams()
- get examsgetFutureExams()
- get future examsgetStreamLeaders()
- get stream leaders (of current user stream)getGroupLeaders()
- get group leaders (of current user group)getActivity()
- get user activitygetProfileInfo()
- get current user profile infogetUserSettings()
- get current user settingsuploadHomework({homeworkId, answerText, file, spentTimeHour, spentTimeMin})
- upload file or comment for specified homework or labdeleteHomework(homeworkId)
- delete uploaded homework