Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/jason-costello/go-canvas

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/jason-costello/go-canvas

  • v0.0.0-20200821044925-04b08bcecf29
  • Source
  • Go
  • Socket score

Version published
Created
Source

go-canvas

An API client for Instructure's Canvas API.

Build Status GoDoc Go Report Card codecov TODOs

Download/Install

go get github.com/harrybrwn/go-canvas

Getting Started

  1. Get a token from your canvas account, this should help.
  2. Give the token to the library
    • Set $CANVAS_TOKEN environment variable
    • Call canvas.SetToken or canvas.New
  3. For more advance usage, viewing the canvas API docs and using the canvas.Option interface will be usful for more fine-tuned api use.

Concurrent Error Handling

Error handling for functions that return a channel and no error is done with a callback. This callback is called ConcurrentErrorHandler and in some cases, a struct may have a SetErrorHandler function.

canvas.ConcurrentErrorHandler = func(e error) error {
    if canvas.IsRateLimit(e) {
        fmt.Println("rate limit reached")
        return nil
    }
    return e
}
for f := range canvas.Files() {
    fmt.Println(f.Filename, f.ID)
}

TODO

  • Groups
  • Outcome Groups
  • Favorites
  • Submissions
    • submiting assignments
    • file upload on assginments

FAQs

Package last updated on 21 Aug 2020

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