moodle-api
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

Moodle API

The easiest way to use the Moodle API with fully typed parameters and responses.

Example

Auto Completion

import { MoodleClient, login } from "moodle-api";

const token = await login(
    process.env.MOODLE_URL,
    process.env.MOODLE_USERNAME,
    process.env.MOODLE_PASSWORD,
);

const client = new MoodleClient(process.env.MOODLE_URL, token);
const info = await client.call("core_webservice_get_site_info");
console.log("Supported Functions:", info.functions.map(f => f.name));

Package Sidebar

Install

npm i moodle-api

Weekly Downloads

35

Version

0.1.0

License

AGPL-3.0

Unpacked Size

3.78 MB

Total Files

7

Last publish

Collaborators

  • jacoblincool