Joodle

Moodle Web Service API client for Node.js

Get Started

Lightweight and flexible

Very few dependencies and extensive configuration for most use cases.

Asynchronous methods

Designed as a Promise-based API for async/await goodness!

Type definitions

Shipped with type definitions so it's TypeScript compatible out of the box!

# Example Usage

import { Joodle } from "joodle";

const client = new Joodle({
  baseURL: "https://moodle.example.com",
  token: "abcdef123456",
});

(async () => {
  try {
    const users = await client.modules.core.user.getUsersByField(
      "email",
      "test1@example.com",
      "test2@example.com"
    );
    // => Users found on Moodle with emails matching test1@example.com or test2@example.com
  } catch (error) {
    // => Moodle threw an error!
  }
})();