@tutorbot/api-client
1.0.0-e • Public • Published
The API client for reqeusts in tutorbot's services
yarn add @tutorbot/api-client
Name |
Argument |
Return |
getGroupData |
groupId: string |
Promise<object|null> |
getGroupActiveTeacherId |
groupId: string |
Ids: Promise<Array<string>> |
Name |
Argument |
Return |
getPartnerMemberData |
partnerId: string, userId: string |
Promise |
Name |
Argument |
Return |
getStudentAttendance |
attendanceId: string, userId: string |
Promise<object|null> |
Name |
Argument |
Return |
getGroupTeacherDailySalary |
groupId: string, teacherId: string, date: string (YYYY-MM-DD) |
Promise<object|null> |
setOrUpdateGroupTeacherDailySalary |
dailySalary: object |
Promise<void> |
deleteGroupTeacherDailySalary |
dailySalaryId: string |
Promise<void> |
getGroupTeacherMonthlySalary |
groupId: string, teacherId: string, period: number |
Promise<void> |
setOrUpdateGroupTeacherMonthlySalary |
monthlySalary: object |
Promise<void> |
deleteGroupTeacherMonthlySalary |
monthlySalaryId: string |
Promise<object|null> |
Name |
Argument |
Return |
createStudentBalanceUnlessExists |
studentId: string, groupId: string, partnerId: string |
Promise<void> |
setOrUpdateStudentBalanceTransaction |
studentId: string, groupId: string, date: string (ISO format), amount: number, type: string, note: string |
Promise<void> |
deleteStudentBalanceTransaction |
studentId: string, groupId: string, date: string (ISO format), type: string |
Promise<void> |
setOrUpdateStudentBalanceBonusTransaction |
studentId: string, groupId: string, date: string (ISO format), amount: number, type: string, note: string |
Promise<void> |
deleteStudentBalanceBonusTransaction |
studentId: string, groupId: string, date: string (ISO format), type: string |
Promise<void> |
Name |
Value |
BALANCE_TYPE_ATTENDANCE |
Attendance |
BALANCE_TYPE_DISCOUNT |
Discount |
BALANCE_TYPE_PAID |
Paid |
BONUS_TYPE_EXCUSE_ATTENDANCE |
Excuse Attendance |
const { LearningApiClient, CrmApiClient } = require("@tutorbot/api-client/src/api-clients/back");
LearningApiClient.course.findOne('your-id-here').then(res);
CrmApiClient.request.findOne('your-id-here').then(res);
use environment variables
CRM_API_URL
CRM_API_KEY
LEARNING_API_URL
LEARNING_API_KEY
import { learningApiClient, crmApiClient } from "@tutorbot/api-client/src/api-clients/front";
LearningApiClient({url: 'your-api-url-here', jwt: 'your-jwt-here'}).course.findOne('your-id-here').then(res);
CrmApiClient({url: 'your-api-url-here', jwt: 'your-jwt-here'}).request.findOne('your-id-here').then(res);
Readme
Keywords
nonePackage Sidebar
Install
npm i @tutorbot/api-client
Weekly Downloads