Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/linusbolls/code-university-sdk
Functionality and data related to CODE University of Applied Sciences (https://code.berlin), specifically the CODE Learning Platform (https://app.code.berlin).
https://github.com/linusbolls/code-university-sdk
Last synced: about 1 month ago
JSON representation
Functionality and data related to CODE University of Applied Sciences (https://code.berlin), specifically the CODE Learning Platform (https://app.code.berlin).
- Host: GitHub
- URL: https://github.com/linusbolls/code-university-sdk
- Owner: LinusBolls
- Created: 2024-02-29T15:25:05.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-07-23T15:26:10.000Z (4 months ago)
- Last Synced: 2024-10-11T13:22:36.913Z (about 1 month ago)
- Language: TypeScript
- Size: 655 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# code-university
Functionality and data related to CODE University of Applied Sciences (https://code.berlin), specifically the CODE Learning Platform (https://app.code.berlin).
## Tested with
- [CODE Learning Platform](https://app.code.berlin) v2.14.5
- NodeJs v20.5.1
- NPM v9.8.0## Install
Install the package:
```bash
npm install code-university
```## Examples
```typescript
// basic usage
import { LearningPlatformClient } from 'code-university';async function main() {
const learningPlatform = await LearningPlatformClient.fromRefreshToken(
process.env.LEARNING_PLATFORM_REFRESH_TOKEN
);
const settings = await learningPlatform.getOwnSettings();console.log(settings);
}
main();
```## Retrieving a refresh token from the CODE Learning Platform
1. Open https://app.code.berlin
2. Open the browser devtools using `Cmd + Shift + I` on mac or `Ctrl + Shift + I` on windows
3. Click on the `Application` tab
4. On the left side of the `Application` tab, click `Cookies` > `https://app.code.berlin`
5. Double-click the `Value` field of the `cid` cookie, and copy it to your clipboard.![Screenshot of the cookies tab](docs/getting-your-access-token.webp)