New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

kth-canvas-api

Package Overview
Dependencies
Maintainers
11
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kth-canvas-api

Functions for communicating with Canvas LMS

  • 0.15.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
21
decreased by-4.55%
Maintainers
11
Weekly downloads
 
Created
Source

This library is used to integrate with the Canvas LMS.

How to use

You need an instance of Canvas LMS to communicate with. Log in to that instance and generate an access token (As of this writing under Account/Settings/Approved integrations in Canvas). Store the newly generated access token:

const accessToken = '123123123123123123123123123123'

Then create a variable containing the url to the Canvas api.

const apiUrl = 'https://xxx.test.instructure.com/api/v1'

Now, instantiate CanvasApi with these two variables:

const CanvasApi = require('canvas-api')

const canvasApi = new CanvasApi(apiUrl, accessToken)

Example functions

List all accounts

canvasApi.listAccounts()
.then(accounts => console.log(JSON.stringify(accounts, null,4)))

List all courses

canvasApi.listCourses()
.then(courses => console.log(JSON.stringify(courses, null,4)))

List all users

canvasApi.listUsers()
.then(courses => console.log(JSON.stringify(courses, null,4)))

FAQs

Package last updated on 08 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc