Giter Club home page Giter Club logo

getting-started-with-the-canvas-api-with-node's Introduction

Getting Started with the Canvas API with Node.js

This script will get you started with interfacing with the Canvas API using JavaScript/Node.js

Getting Started

These instructions will get you a copy of the script up and running on your local machine for use with Canvas and your own API tokens. This script makes a request to the Canvas API that displays basic information about your user profile.

Prerequisites

  1. Install Node 8.0.0 or greater.
  2. Install Git.

Installation and execution

Not sure how to clone a repo? Check out this helpful guide first!

  1. Open command prompt on Mac or command line on Windows.
  2. Clone this repo. git clone https://github.com/ubccapico/getting-started-with-the-canvas-api-with-node.git
  3. Then cd into the repo. cd getting-started-with-the-canvas-api-with-node
  4. Run the installation script. npm install (If you see babel-node: command not found, you've missed this step.)
  5. Generate Canvas API token and copy it to clipboard.
  6. Rename the sample.env file to .env, and add your API token to CANVAS_API_TOKEN={ADD TOKEN HERE}.
  7. Run the script. node index.js. This should log your Canvas info.

What to do from here

Try running some other scripts from Capico. This script, for example, allows you to download all of the Canvas discussions from your course.

You can also write your own code and run it! Be mindful that the API is running on the production Canvas instance - if you want to run against the Beta or Test instance, change the URL in .env to https://ubc.test.instructure.com/api/v1 or http://ubc.beta.instructure.com/api/v1 and regenerate your token(s) from the Beta/Test site. Students do not have access to Beta or Test, sorry!

Authors

License

This project is licensed under the GPL 3 License.

getting-started-with-the-canvas-api-with-node's People

Contributors

dependabot[bot] avatar justin0022 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.