{"id":20909801,"url":"https://github.com/gusruben/aspen-api","last_synced_at":"2026-02-13T09:23:58.840Z","repository":{"id":166856163,"uuid":"585295630","full_name":"gusruben/aspen-api","owner":"gusruben","description":"An API client library for interacting with Aspen, a Student Information System (SIS) created by Follett and used in schools around the U.S.","archived":false,"fork":false,"pushed_at":"2025-03-05T16:17:36.000Z","size":189,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T11:51:45.134Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gusruben.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-01-04T20:12:43.000Z","updated_at":"2025-03-05T16:17:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"973b2380-75e0-4530-b882-d46f3106f96f","html_url":"https://github.com/gusruben/aspen-api","commit_stats":null,"previous_names":["gusruben/aspen-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gusruben%2Faspen-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gusruben%2Faspen-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gusruben%2Faspen-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gusruben%2Faspen-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gusruben","download_url":"https://codeload.github.com/gusruben/aspen-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249770033,"owners_count":21323067,"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":[],"created_at":"2024-11-18T14:12:54.621Z","updated_at":"2026-02-13T09:23:53.804Z","avatar_url":"https://github.com/gusruben.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `aspen-api`\n\n\u003e An API client library for interacting with Aspen, a Student Information System (SIS) created by Follett and used in schools around the U.S.\n\nThis package is a work-in-progress. Some features may be missing or not fully fleshed-out!\n\n## Installation\n\n`aspen-api` can be installed from NPM with your node package manager of choice:\n\n```sh\nnpm install aspen-api\n```\n\n```sh\nyarn install aspen-api\n```\n\n```sh\npnpm install aspen-api\n```\n\n\u003e Note: `aspen-api` is [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), rather than CommonJS. That means that if you want to use it in a project written in CommonJS, you need to either convert your project to ESM, or use the [`import()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import) function.\n\n## Usage\n\nYou can access Aspen through a single class. You need to initiate it using your 'district ID.' All Aspen instances are hosted at a subdomain of [myfollett.com](https://myfollett.com), though some districts might  have students use a different domain, for example, [aspen.dcps.dc.gov](https://aspen.dcps.dc.gov) -\u003e [dcps.myfollett.com](https://dcps.myfollett.com).\n\n```ts\nimport Aspen from \"aspen-api\";\n\nconst aspen = new Aspen(\"dcps\");\n```\n\nOnce you've created an `Aspen` object, you need to log in:\n\n```ts\n// store your login however you want!\nconst username = process.env.USERNAME\nconst password = process.env.PASSWORD\n\nawait aspen.login({ username, password })\n```\n\n## API\n\n### Aspen\n\nEverything in `aspen-api` is stored in a central `Aspen` class.\n\n#### `constructor(id: string, cookies? Cookie[])`\n\nConstructs a new `Aspen` object. The `id` is the subdomain of `\u003cid\u003e.myfollett.com`. Cookies can be passed in using an array of [`Cookie`](https://github.com/salesforce/tough-cookie#cookie) objects. `aspen-api` uses [`tough-cookie`](https://www.npmjs.com/package/tough-cookie) for managing cookies. If you want to save an Aspen session and reconstruct it later, this is the recommended way to do it.\n\n```ts\nimport Aspen from \"aspen-api\";\n\nconst aspen = new Aspen(\"dcps\");\n```\n\n#### `login(options: { username: string, password: string })`\n\n```ts\n// store your login however you want!\nconst username = process.env.USERNAME;\nconst password = process.env.PASSWORD;\n\nawait aspen.login({ username, password });\n```\n\n#### `getClasses()`\n\n**Returns: `Promise\u003cClassInfo[]\u003e`**\n\nGets a list of all the classes, along with info about them.\n\n```ts\nconst classes = await aspen.getClasses();\n```\n\n#### `getClass(token: string)`\n\n**Returns: `Promise\u003cClassData\u003e`**\n\nGets data about a class, including grades. The `token` is a sort of identifier for the class, it comes in the data from the `getClasses` function.\n\n```ts\n// grab this earlier from getClasses()\nconst token = // ...\n\nconst mathClass = await getClass(token);\n```\n\n#### `getAssignments(token: string)`\n\n**Returns: `Promise\u003cAssignment[]\u003e`**\n\nGets the list of assignments from a class.\n\n```ts\n// grab this earlier from getClasses()\nconst token = // ...\n\nconst mathAssignments = await getAssignments(token);\n```\n\n#### `getSchedule()`\n\n**Returns: `Promise\u003cSchedule\u003e`**\n\nGets the current schedule of the current student.\n\n#### `getCookies()`\n\n**Returns: `Promise\u003cCookie[]\u003e`**\n\nGets a list of all the stored cookies.\n\n## Types\n\nSee [`types.ts`](https://github.com/gusruben/aspen-api/blob/main/src/types.ts).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgusruben%2Faspen-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgusruben%2Faspen-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgusruben%2Faspen-api/lists"}