cwickham / cnvs Goto Github PK
View Code? Open in Web Editor NEWExperimental R package to access Canvas LMS API based on gh
Home Page: https://cwickham.github.io/cnvs/
License: Other
Experimental R package to access Canvas LMS API based on gh
Home Page: https://cwickham.github.io/cnvs/
License: Other
Line 38 in e90ee50
assignment(name = "Homework 1", points_possible = 10)
generates list of right form for passing to POST /api/v1/courses/:course_id/assignments
with class cnvs_assignment
.
GET /api/v1/courses/:course_id/assignments
returns lists of cnvs_assignment
objectsid()
might make it easy to feed output from one query as endpoint parameter in another, e.g.
disc <- cnvs("POST /api/v1/courses/:course_id/discussion_topics",
course_id = 101991,
title = "Q&A"
)
entry <- cnvs("POST /api/v1/courses/:course_id/discussion_topics/:topic_id/entries",
course_id = 101991,
topic_id = id(disc),
message = "I have a question"
)
create_assignment()
, shortcut for cnvs("POST /api/v1/courses/:course_id/assignments")
To facilitate copy and paste usage, endpoints should need to be specified with /api/url
so can copy-and-paste from canvas docs which specify endpoints like:
GET /api/v1/courses/:course_id/modules
Instead treat domain more like token, you can't do anything without setting one explicitly: either as an argument or with an environment variable.
E.g. rather than having something like:
course_id <- 199291
at the top of each script (which is a pain when reusing a course in a new term), look for an environment variable CANVAS_COURSE_ID
. This could be set on a project level with usethis::edit_r_environ("project")
.
These still have gh documentation
export(cnvs)
export(cnvs_token)
export(cnvs_whoami)
export(gh_first)
export(gh_last)
export(gh_next)
export(gh_prev)
Might be nice to have a way to handle multiple domain-token pairs for situations where you use two different canvas sites, e.g.: https://canvas.instructure.com/
and https://oregonstate.instructure.com/
S3method(print,gh_response)
export(gh_first)
export(gh_last)
export(gh_next)
export(gh_prev)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.