/ x / gesso@v0.1.2

Gesso 🎨

An ESM library for the Canvas LMS REST API


The goal of this library is to provide types and methods for the Canvas LMS REST API.

Also available on npm as gesso-canvas-api!

Quick Start Example

// install with npm i gesso-canvas-api
import {
} from 'gesso-canvas-api';

// or use Deno!
import {
} from "";

async function getCourses() {
  const thing = {
    // your canvas domain
    domain: "",
    // auth with a key
    apiKey: "your API key",
    // or tokens...
    tokens: { accessToken: "", refreshToken: "" },

  // create a new Configuration object
  const config = new Configuration(thing);
  // instantiate the class you'd like to make calls on
  const courseApi = new Courses(config);

  try {
    // and get back a list of Course objects!
    return await courseApi.listCourses();
  } catch (error) {
    return error;

Repo Structure


This folder contains all of the TypeScript interfaces for the models and query parameters for each route.

The /types/json folder contains the JSON examples from the Canvas LMS REST API documentation that is scraped by the scripts in /scrapers


This folder contains all of the classes that are generated from the route information in the API docs, as well as the BaseApi and Configuration classes.


The most important folder, all of the interfaces and classes are generated by the Python scripts in here.

This file scrapes all of the example JSON models and saves them to /types/json, as well as creating a list of type names in /temp/entities.txt for routeScraper to use. THIS SHOULD BE RAN BEFORE

This file creates both the query param interfaces as well as the classes. (To be split into 2 separate scrapers)

Creates the mod.ts in /src to export the types for Deno 🦕

A TypeScript API client for Canvas LMS
GitHub RepositoryPeekoe/Gesso
GitHub Stars

Version Info

Tagged at
2 months ago