Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

any docs anywhere? #9

Open
titaniumbones opened this issue Nov 3, 2018 · 3 comments
Open

any docs anywhere? #9

titaniumbones opened this issue Nov 3, 2018 · 3 comments

Comments

@titaniumbones
Copy link

Hi, this looks like it oculd bereally useful to me, do you have any docs anywhere? Thank you!

@jwirt
Copy link

jwirt commented Nov 5, 2018 via email

@stuartf
Copy link
Collaborator

stuartf commented Nov 6, 2018

The basics are:

const Canvas = require('canvas-lms-api');
const canvas = new Canvas(process.env.CANVAS_URL, {'accessToken': process.env.CANVAS_TOKEN});
canvas.get('courses/1/enrollments').then(enrollments => console.log(enrollments);

If you need to POST you can similarly do:

const user = {...};
canvas.post('/accounts/self/users', null, user).then(result => console.log(result));

Endpoints are all documented at https://canvas.instructure.com/doc/api/

If you want to write up something more formal (or just put the contents of this post in the README.md I'll merge it)

@titaniumbones
Copy link
Author

titaniumbones commented Nov 7, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants