Code Monkey home page Code Monkey logo

cnvs's People

Contributors

batpigandme avatar cderv avatar coatless avatar cwickham avatar gaborcsardi avatar hadley avatar jennybc avatar jimhester avatar jsta avatar krlmlr avatar lionel- avatar noamross avatar realakhmed avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

brouwern

cnvs's Issues

What might a higher level API have?

  • Constructors for common objects
    E.g. 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.
    • Allows for argument checking. Match Canvas docs for required vs. optional.
    • Allows for certain responses to be returned as these objects, e.g. GET /api/v1/courses/:course_id/assignments returns lists of cnvs_assignment objects
    • Custom print methods can include URL to visit the resource on Canvas.
    • Accessor functions, e.g. id() 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"
      )
  • Endpoint Shortcut functions
    E.g. create_assignment(), shortcut for cnvs("POST /api/v1/courses/:course_id/assignments")
    I'm not sure how I feel about this, requires implementing function for every (?) endpoint?

Remove `/api/v1` from api_url

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 

Shouldn't have a default domain

Instead treat domain more like token, you can't do anything without setting one explicitly: either as an argument or with an environment variable.

Ways to handle course IDs on a project level

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").

Re-write documentation

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)

Ways to handle more than one canvas domain

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/

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.