npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@openworkspace/classroom

v0.1.1

Published

Google Classroom API client for courses, assignments, and grading

Readme

@openworkspace/classroom

Google Classroom API client for OpenWorkspace -- courses, coursework, roster, submissions.

Part of the OpenWorkspace monorepo.

Install

npm install @openworkspace/classroom @openworkspace/core

Usage

import { createHttpClient } from '@openworkspace/core';
import { listCourses, listStudents, createCourseWork, gradeSubmission } from '@openworkspace/classroom';

const http = createHttpClient({ auth: { accessToken: 'token' } });

// List courses
const result = await listCourses(http);
if (result.ok) {
  for (const course of result.value.courses ?? []) {
    console.log(course.name, course.courseState);
  }
}

// List students in a course
const students = await listStudents(http, 'courseId');

// Create an assignment
await createCourseWork(http, 'courseId', {
  title: 'Homework 1',
  workType: 'ASSIGNMENT',
  maxPoints: 100,
});

// Grade a submission
await gradeSubmission(http, 'courseId', 'courseWorkId', 'submissionId', { assignedGrade: 95 });

API

All functions take an HttpClient as the first parameter and return Result<T, E>.

Courses

  • listCourses(http) -- List all courses
  • getCourse(http, id) -- Get a course
  • createCourse(http, course) -- Create a course
  • updateCourse(http, id, course) -- Update a course
  • deleteCourse(http, id) -- Delete a course
  • archiveCourse(http, id) -- Archive a course

Roster

  • listStudents(http, courseId) -- List students
  • listTeachers(http, courseId) -- List teachers
  • addStudent(http, courseId, email) -- Add a student
  • addTeacher(http, courseId, email) -- Add a teacher
  • removeStudent(http, courseId, userId) -- Remove a student
  • removeTeacher(http, courseId, userId) -- Remove a teacher

Coursework & Submissions

  • listCourseWork(http, courseId) -- List assignments
  • getCourseWork(http, courseId, id) -- Get an assignment
  • createCourseWork(http, courseId, work) -- Create an assignment
  • updateCourseWork(http, courseId, id, work) -- Update an assignment
  • deleteCourseWork(http, courseId, id) -- Delete an assignment
  • listSubmissions(http, courseId, workId) -- List submissions
  • getSubmission(http, courseId, workId, id) -- Get a submission
  • gradeSubmission(http, courseId, workId, id, grade) -- Grade a submission
  • returnSubmission(http, courseId, workId, id) -- Return a submission

Announcements & Guardians

  • listAnnouncements(http, courseId) -- List announcements
  • createAnnouncement(http, courseId, announcement) -- Create an announcement
  • deleteAnnouncement(http, courseId, id) -- Delete an announcement
  • listGuardians(http, studentId) -- List guardians
  • inviteGuardian(http, studentId, email) -- Invite a guardian

License

MIT