{"id":19198121,"url":"https://github.com/harrybrwn/go-canvas","last_synced_at":"2025-05-09T00:54:10.675Z","repository":{"id":144211823,"uuid":"264740017","full_name":"harrybrwn/go-canvas","owner":"harrybrwn","description":"A client for Instructure's Canvas API","archived":false,"fork":false,"pushed_at":"2020-08-30T03:19:47.000Z","size":313,"stargazers_count":5,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-09T00:54:03.174Z","etag":null,"topics":["api","canvas","canvas-lms","instructure"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harrybrwn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-05-17T19:20:48.000Z","updated_at":"2024-03-16T05:23:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"2da56815-0595-4bea-98b8-43eb6ba038ec","html_url":"https://github.com/harrybrwn/go-canvas","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrybrwn%2Fgo-canvas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrybrwn%2Fgo-canvas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrybrwn%2Fgo-canvas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrybrwn%2Fgo-canvas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harrybrwn","download_url":"https://codeload.github.com/harrybrwn/go-canvas/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253171237,"owners_count":21865289,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","canvas","canvas-lms","instructure"],"created_at":"2024-11-09T12:20:10.121Z","updated_at":"2025-05-09T00:54:10.667Z","avatar_url":"https://github.com/harrybrwn.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-canvas\nAn API client for Instructure's Canvas API.\n\n[![Build Status](https://travis-ci.com/harrybrwn/go-canvas.svg?branch=master)](https://travis-ci.com/harrybrwn/go-canvas)\n[![GoDoc](https://godoc.org/github.com/github.com/harrybrwn/go-canvas?status.svg)](https://pkg.go.dev/github.com/harrybrwn/go-canvas?tab=doc)\n[![Go Report Card](https://goreportcard.com/badge/github.com/harrybrwn/go-canvas)](https://goreportcard.com/report/github.com/harrybrwn/go-canvas)\n[![codecov](https://codecov.io/gh/harrybrwn/go-canvas/branch/master/graph/badge.svg)](https://codecov.io/gh/harrybrwn/go-canvas)\n[![TODOs](https://badgen.net/https/api.tickgit.com/badgen/github.com/harrybrwn/go-canvas)](https://www.tickgit.com/browse?repo=github.com/harrybrwn/go-canvas)\n\n## Download/Install\n```\ngo get github.com/harrybrwn/go-canvas\n```\n\n## Getting Started\n1. Get a token from your canvas account, [this](https://community.canvaslms.com/docs/DOC-16005-42121018197) should help.\n2. Give the token to the library\n    * Set `$CANVAS_TOKEN` environment variable\n    * Call `canvas.SetToken` or `canvas.New`\n3. For more advance usage, viewing the [canvas API docs](https://canvas.instructure.com/doc/api/index.html) and using the `canvas.Option` interface will be usful for more fine-tuned api use.\n\n### Concurrent Error Handling\nError 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.\n```go\ncanvas.ConcurrentErrorHandler = func(e error) error {\n    if canvas.IsRateLimit(e) {\n        fmt.Println(\"rate limit reached\")\n        return nil\n    }\n    return e\n}\nfor f := range canvas.Files() {\n    fmt.Println(f.Filename, f.ID)\n}\n```\n\n## TODO\n* Groups\n* Outcome Groups\n* Favorites\n* Submissions\n    * submiting assignments\n    * file upload on assginments\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharrybrwn%2Fgo-canvas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharrybrwn%2Fgo-canvas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharrybrwn%2Fgo-canvas/lists"}