All Projects → cs10 → Node Canvas Lms

cs10 / Node Canvas Lms

A simple (WIP) node wrapper for the Canvas LMS API

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Node Canvas Lms

Curriculum
👩‍🏫 👨‍🏫 The open-source curriculum of Enki!
Stars: ✭ 624 (+10300%)
Mutual labels:  education
Carbon
🖤 Create and share beautiful images of your source code
Stars: ✭ 29,304 (+488300%)
Mutual labels:  education
Pyret Lang
The Pyret language.
Stars: ✭ 771 (+12750%)
Mutual labels:  education
A Tale Of Three Lists
Comparing various async patterns for a single demo
Stars: ✭ 639 (+10550%)
Mutual labels:  education
Courses
Awesome Courses
Stars: ✭ 663 (+10950%)
Mutual labels:  education
Letswritecode
🎓 code examples for Let's Write Code
Stars: ✭ 717 (+11850%)
Mutual labels:  education
Appjar
Simple Tkinter GUIs in Python
Stars: ✭ 565 (+9316.67%)
Mutual labels:  education
Whitebophir
Online collaborative Whiteboard that is simple, free, easy to use and to deploy
Stars: ✭ 821 (+13583.33%)
Mutual labels:  education
Udacity Nanodegrees
🎓 List of Udacity Nanodegree programs with links to the free courses in their curricula
Stars: ✭ 5,893 (+98116.67%)
Mutual labels:  education
Resources For Beginner Bug Bounty Hunters
A list of resources for those interested in getting started in bug bounties
Stars: ✭ 7,185 (+119650%)
Mutual labels:  education
The Littlest Jupyterhub
Simple JupyterHub distribution for 1-100 users on a single server
Stars: ✭ 640 (+10566.67%)
Mutual labels:  education
Rest Api Sections
A small repository of projects built in my course, REST APIs with Flask and Python.
Stars: ✭ 645 (+10650%)
Mutual labels:  education
Sakai
Sakai is a freely available, feature-rich technology solution for learning, teaching, research and collaboration. Sakai is an open source software suite developed by a diverse and global adopter community.
Stars: ✭ 729 (+12050%)
Mutual labels:  education
Datascience Box
Data Science Course in a Box
Stars: ✭ 629 (+10383.33%)
Mutual labels:  education
Pointfreeco
🎬 The source for www.pointfree.co, a video series on functional programming and the Swift programming language.
Stars: ✭ 782 (+12933.33%)
Mutual labels:  education
Ripes
A graphical processor simulator and assembly editor for the RISC-V ISA
Stars: ✭ 584 (+9633.33%)
Mutual labels:  education
Teaching App Dev Swift
DEPRECATED. Instructor lesson plans that accompany Xcode projects, for guiding in-class experiential learning.
Stars: ✭ 699 (+11550%)
Mutual labels:  education
Chronophore
Desktop app for tracking student sign-ins in a tutoring center.
Stars: ✭ 6 (+0%)
Mutual labels:  education
The Complete Guide To Modern Javascript
A comprehensive, easy-to-follow ebook to learn everything from the basics of JavaScript to ES2020. Read more on my blog https://inspiredwebdev.com or buy it here http://a-fwd.to/jHO6m9t. Get the course here https://www.educative.io/courses/complete-guide-to-modern-javascript?aff=BqmB
Stars: ✭ 827 (+13683.33%)
Mutual labels:  education
Learn Vim
Learning Vim and Vimscript doesn't have to be hard. This is the guide that you're looking for.
Stars: ✭ 7,221 (+120250%)
Mutual labels:  education

canvas-lms

A simple node.js wrapper for the Canvas LMS API, with some sugar!

Quick Overview

The only required parameter is host, but in most cases, you'll also want an auth token to do anything useful.

var Canvas = require('canvas-lms');

var lms = new Canvas({
	host: 'https://canvas.instructure.com',
	token: 'YOUR-TOKEN',
	name: ' (Optional) My Awesome Canvas Site'
});

// OR
var lms = new Canvas('https://canvas.instructure.com', 'YOUR-TOKEN', options);

The Cavnas object is a very simple API wrapper based around requests, designed to allow easier access. There's two basics:

  • Options: Pass an options object when creating a Canvas instance. There are currently a few parameters, but only token is required.
    • token: an auth token to access your Canvas instance. [See these docs.][canvas-token]
    • version: This defaults to "v1", which is currently the only version of the Canvas LMS API. However, if versions change, the support is there.
    • name: is an optional name for the Canvas instance. It's useful for debugging if you have lots of different instances.
    • TODO: - headers, ID formats

Functions

A Canvas object has 4 main functions: get, post, put, delete.

  • .get(endpoint, query, callback)

  • .post(endpoint, query, form, callback)

  • .put(endpoint, query, form, callback)

  • .delete(endpoint, query, callback)

  • endpoint is a string, which is the URL you are calling. It should start from the part after "v1/" in the Canvas URL.

    • Example:
      • The full URL: https://bcourses.berkeley.edu/api/v1/courses/1371647/users
      • Should be written as: courses/1371647/users
  • query is a native object which gets encoded as a querystring by node.

    • Example:

      • The object:
       {
       	per_page: 100,
       	include: ['assignments', 'user']
       }
      
      • Will return: ?per_page=100&include[]=assignments&include[]=user
    • This have been designed to follow Canvas conventions for querystring formats (which are based on Rails). I highly recommend using this object format rather than writing your own strings!

  • callback: Is a request callback. It has the format:

     function (err, response, body) {
    
     }
    
    • Note that body will be parsed and return a native JS object, rather than a JSON string.
  • form: For put and post requests, a form parameter is usually expected. This us a URL-form-encoded parameter. TODO: reference canvas docs...

Shorthand

All functions support a shorthand format, where query and form are empty. In that case the method signatures look like this:

  • .get(endpoint, callback)
  • .post(endpoint, callback)
  • .put(endpoint, callback)
  • .delete(endpoint, callback)

Course Objects

FUTURE

Requirements

canvas-lms makes use of ES6, so please use Node.js 4.2.x or newer. To use an older version of node, please use the v0.0.7 tag. 4.2 has LTS; this hopefully isn't a terrible restriction!

Development

The master branch tracks the stable version, which is published to npm. Development occurs on the dev branch. Currently This is going through a pretty big update, so be sure to check that out.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].