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 🙏

© 2024 – Pkg Stats / Ryan Hefner

google-classroom

v2.1.0

Published

A promise based Google Classroom wrapper.

Downloads

44

Readme

node-google-classroom

A promise based Google Classroom wrapper.

Too lazy to do this. If you can understand the code pls do this for me :)


Index

Getting Started Properties/Structures/Associated methods


Getting Started:

You will need:

  • client id from google api
  • client secret from google api
  • refresh token
  • preferably all scopes permitted for the tokens

Example:

const Client = require('google-classroom')

const client = new Client({
  clientId: 'xxx',
  clientSecret:  'xxx',
  refreshToken: 'xxx'
})

client.on('ready', async classr =>{
  client.getCourses()
   .then(data =>{
     console.log(data)
   })
})

Properties/Structures/Associated methods


client

  • clientId - Your client id
  • clientSecret - Your client secret
  • refreshToken - Your refresh token
  • createCoures(name, section) - Creates a course (You'll have to accept the invitation to teach on a desktop.)
    • Parameters:
      • name: The name of the course
      • section: The section of the course
  • getCourses() - Returns a list of courses you're in
  • getInvites() - Returns a list of outstanding invites

course

  • id - The id of the course
  • name - The name of the course
  • section - The section of the course
  • descriptionHeading - The description heading of the course
  • description - The description of the course
  • room - Room location of the course
  • ownerId - The ID of the owner of the course
  • creationTime - The time the course was created (RFC3339 UTC "Zulu" format, accurate to nanoseconds)
  • updateTime - The most recent time the course was updated
  • enrollmentCode - The enrolement code for the course
  • courseState - The state of the court
  • alternateLink - Absolute link to this course in the Classroom web UI
  • teacherGroupEmail - The email address of a Google group containing all teachers of the course
  • courseGroupEmail - The email address of a Google group containing all members of the course
  • teacherFolder - Information about a Drive Folder that is shared with all teachers of the course
  • guardiansEnabled - Whether or not guardian notifications are enabled for this course
  • createAnnouncement(announcement, materials) - Creates an announcment for the course
    • Parameters:
      • announcment: The announcment
      • materials: An array of object of materials as documented here
  • createAssignment(assignment)
    • Parameter
      • assignment: An Assignment object as documented here

courseWork

  • courseId - The id of the courseWork/assignment
  • id - The id of the classroom this courseWork/assignment is in
  • title - The title of the assignment
  • description - THe description of the assignment
  • materials - The materials the assignment has set
  • state - The state of the assignment
  • alternateLink - Absolute link to this course in the Classroom web UI
  • creationTime - The time the course was created (RFC3339 UTC "Zulu" format, accurate to nanoseconds)
  • updateTime - The most recent time the course was updated
  • dueDate - The date the assignment is due
  • dueTime - The time the assignment is due
  • scheduledTime - Optional timestamp when this course work is scheduled to be published.
  • maxPoints - Maximum grade for this course work. If zero or unspecified, this assignment is considered ungraded.
  • workType - Type of this course work.
  • associatedWithDeveloper - Whether this course work item is associated with the Developer Console project making the request.
  • assigneeMode - Assignee mode of the coursework. Default value is ALL_STUDENTS.
  • individualStudentsOptions - Identifiers of students with access to the coursework. This field is set only if assigneeMode is INDIVIDUAL_STUDENTS. If the assigneeMode is INDIVIDUAL_STUDENTS, then only students specified in this field will be assigned the coursework.
  • submissionModificationMode - Setting to determine when students are allowed to modify submissions.
  • creatorUserId - Identifier for the user that created the coursework.
  • assignment - Assignment details
  • multipleChoiceQuestion - Multiple choice question details. *delete() - Deletes the assignment.

invitation

  • id - Identifier of classroom
  • userId - Identifier of the invited user
  • courseId - Identifier of the course to invite the user to
  • role - Role to invite the user to have
  • accept() - Accept the invitation

student

  • courseId - Identifier of the course
  • userId - Identifier of the user
  • profile - Global user information for the student
  • studentWorkFolder - Information about a Drive Folder for this student's work in this course. Only visible to the student and domain administrators
  • remove() - Removes the student from this course

teacher

  • courseId - Identifier of the course
  • userId - Identifier of the user
  • profile - Global user information for the teacher
  • remove() - Removes the teacher from this course