Function: createMoodle()
function createMoodle(options): Moodle;
Defined in: client.ts:294
Works one Moodle site through a browser: give the site and the browser's options (or a browser manager), and optionally the defaults its calls use; then call the driver's operations as methods.
const moodle = createMoodle({ site: "https://campus.example.org/", profileDir: "/home/me/.moodle-profile", headless: true, downloadBrowser: true, trail: "fast" });
await moodle.logIn();
const courses = await moodle.listCourses();
await moodle.close();
Parameters
| Parameter | Type |
|---|---|
options | MoodleOptions |