{"id":15507085,"url":"https://github.com/kpfromer/cu-api","last_synced_at":"2025-04-23T02:01:58.267Z","repository":{"id":37028266,"uuid":"255419286","full_name":"kpfromer/cu-api","owner":"kpfromer","description":"An API for CU Boulder students.","archived":false,"fork":false,"pushed_at":"2025-03-28T02:30:14.000Z","size":151,"stargazers_count":2,"open_issues_count":11,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-17T23:33:05.001Z","etag":null,"topics":["api","colorado","cu","cu-boulder","javascript","typescript","university","university-of-colorado"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kpfromer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2020-04-13T19:12:02.000Z","updated_at":"2023-03-07T11:32:39.000Z","dependencies_parsed_at":"2024-03-02T02:47:47.646Z","dependency_job_id":"09de6f81-4e1d-466c-950e-7b1ebc70c06f","html_url":"https://github.com/kpfromer/cu-api","commit_stats":{"total_commits":166,"total_committers":3,"mean_commits":"55.333333333333336","dds":"0.25903614457831325","last_synced_commit":"7cbf7156cd14d5401e1d7691d6309ff42e058c76"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpfromer%2Fcu-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpfromer%2Fcu-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpfromer%2Fcu-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpfromer%2Fcu-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kpfromer","download_url":"https://codeload.github.com/kpfromer/cu-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250354494,"owners_count":21416752,"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","colorado","cu","cu-boulder","javascript","typescript","university","university-of-colorado"],"created_at":"2024-10-02T09:29:44.647Z","updated_at":"2025-04-23T02:01:58.178Z","avatar_url":"https://github.com/kpfromer.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cu-api\n\n[![npm\nversion](https://badge.fury.io/js/cu-api.svg)](https://badge.fury.io/js/cu-api)\n[![Release](https://github.com/kpfromer/cu-api/actions/workflows/release.yaml/badge.svg?branch=master)](https://github.com/kpfromer/cu-api/actions/workflows/release.yaml)\n\n## Disclaimer\n\nThis project was created by me (Kyle Pfromer) and has **no endorsement by the University of Colorado.**\n\n## Installation\n\n`npm install --save cu-api`\n\n`yarn add cu-api`\n\n## Usage\n\nThe api code is written with TypeScript, but also works with JavaScript (typings\nare included).\n\nCreate a session and login. Then get all the data you need with the session\n(the session acts as a logged in user, saving time).\n\n### ES6\n\n```javascript\nimport { CUSession } from 'cu-api';\n\n(async function () {\n  const session = new CUSession();\n  await session.init('username', 'password');\n  console.log(session.loggedIn);\n  console.log(await session.userData());\n  console.log(await session.termData());\n  console.log(await session.GPA());\n  console.log(await session.classTermData('2201'));\n})();\n```\n\n### ES5\n\n```javascript\nconst CUSession = require('cu-api').CUSession;\n\n(async function () {\n  const session = new CUSession();\n  await session.init('username', 'password');\n  console.log(session.loggedIn);\n  console.log(await session.userData());\n  console.log(await session.termData());\n  console.log(await session.GPA());\n  console.log(await session.classTermData('2201'));\n})();\n```\n\n### CLI\n\nMake sure to install `libsecret` (https://github.com/atom/node-keytar).\n\n## How it Works\n\n`cu-api` uses `superagent` a http request library to act like a user and login\n(the CU login process is really convoluted). When logged in it accesses the\nbackend API used by the `buffportal` Angular application to grab the data you\nneed. You have access to everything the `buffportal` has access to!\n\n## Requirements\n\nYou must have nodejs installed. This **will not work** on the browser since I had to self sign a certificate for `buffportal`.\n\n## License\n\n`cu-api` is [MIT licensed](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkpfromer%2Fcu-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkpfromer%2Fcu-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkpfromer%2Fcu-api/lists"}