The StudentVUE Client to access the API

Hierarchy

  • Client
    • Client

Constructors

  • Parameters

    • credentials: LoginCredentials
    • hostUrl: string

    Returns Client

Methods

  • Returns the attendance of the student

    Returns

    Returns an Attendance object

    Description

    client.attendance()
    .then(console.log); // -> { type: 'Period', period: {...}, schoolName: 'University High School', absences: [...], periodInfos: [...] }

    Returns Promise<Attendance>

  • Returns

    Returns a Calendar object

    Description

    client.calendar({ interval: { start: new Date('5/1/2022'), end: new Date('8/1/2021') }, concurrency: null }); // -> Limitless concurrency (not recommended)

    const calendar = await client.calendar({ interval: { ... }});
    console.log(calendar); // -> { schoolDate: {...}, outputRange: {...}, events: [...] }

    Parameters

    • options: CalendarOptions = {}

      Options to provide for calendar method. An interval is required.

    Returns Promise<Calendar>

  • Gets the student's documents from synergy servers

    Returns

    Returns a list of student documents

    Description

    const documents = await client.documents();
    const document = documents[0];
    const files = await document.get();
    const base64collection = files.map((file) => file.base64);

    Returns Promise<Document[]>

  • Returns the gradebook of the student

    Returns

    Returns a Gradebook object

    Description

    const gradebook = await client.gradebook();
    console.log(gradebook); // { error: '', type: 'Traditional', reportingPeriod: {...}, courses: [...] };

    await client.gradebook(0) // Some schools will have ReportingPeriodIndex 0 as "1st Quarter Progress"
    await client.gradebook(7) // Some schools will have ReportingPeriodIndex 7 as "4th Quarter"

    Parameters

    • Optional reportingPeriodIndex: number

      The timeframe that the gradebook should return

    Returns Promise<Gradebook>

  • Get a list of messages of the student

    Returns

    Returns an array of messages of the student

    Description

    await client.messages(); // -> [{ id: 'E972F1BC-99A0-4CD0-8D15-B18968B43E08', type: 'StudentActivity', ... }, { id: '86FDA11D-42C7-4249-B003-94B15EB2C8D4', type: 'StudentActivity', ... }]
    

    Returns Promise<Message[]>

  • Gets a list of report cards

    Returns

    Returns a list of report cards that can fetch a file

    Description

    const reportCards = await client.reportCards();
    const files = await Promise.all(reportCards.map((card) => card.get()));
    const base64arr = files.map((file) => file.base64); // ["JVBERi0...", "dUIoa1...", ...];

    Returns Promise<ReportCard[]>

  • Gets the schedule of the student

    Returns

    Returns the schedule of the student

    Description

    await schedule(0) // -> { term: { index: 0, name: '1st Qtr Progress' }, ... }
    

    Parameters

    • Optional termIndex: number

      The index of the term.

    Returns Promise<Schedule>

  • Gets the student's school's information

    Returns

    Returns the information of the student's school

    Description

    await client.schoolInfo();

    client.schoolInfo().then((schoolInfo) => {
    console.log(_.uniq(schoolInfo.staff.map((staff) => staff.name))); // List all staff positions using lodash
    })

    Returns Promise<SchoolInfo>

  • Gets the info of a student

    Returns

    StudentInfo object

    Description

    studentInfo().then(console.log) // -> { student: { name: 'Evan Davis', nickname: '', lastName: 'Davis' }, ...}
    

    Returns Promise<StudentInfo>

  • Validate's the user's credentials. It will throw an error if credentials are incorrect

    Returns Promise<void>

  • Type Parameters

    • T extends undefined | object

    Parameters

    • url: string
    • options: Partial<RequestOptions> = {}
    • preparse: ((xml: string) => string) = ...
        • (xml: string): string
        • Parameters

          • xml: string

          Returns string

    Returns Promise<T>

Generated using TypeDoc